From 3a4fe8ce9e995798fefcc5b8336bb4c071b04488 Mon Sep 17 00:00:00 2001 From: Bjarke Sporring Date: Wed, 21 Jan 2026 11:56:56 +0100 Subject: [PATCH] tweak: expand upon some explanations --- 01-essentials/05-cherry-pick/README.md | 12 +++++++----- 01-essentials/06-revert/README.md | 3 +++ 01-essentials/08-multiplayer/README.md | 2 +- util.ps1 | 5 +++++ 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/01-essentials/05-cherry-pick/README.md b/01-essentials/05-cherry-pick/README.md index 97081bc..b1068f1 100644 --- a/01-essentials/05-cherry-pick/README.md +++ b/01-essentials/05-cherry-pick/README.md @@ -110,24 +110,26 @@ Now copy the bug fix commits from development to main: - Look for a commit message like "Fix security vulnerability in input validation" - Note its hash (first 7 characters) -2. Cherry-pick the security fix: +2. First let's just check whether or not we have the `security.py` and `cache.py` file available by running `ls` in the challenge directory or check the file explorer in your VSCode + +3. Cherry-pick the security fix: ```pwsh git cherry-pick # Example if the hash is abc1234: # git cherry-pick abc1234 ``` -3. Verify it worked: Check that security.py, with `ls` or check your file explorer in VSCode, now exists and check that the commit has been added to the main branch with `git log --oneline --graph --all` -4. Find the performance fix commit hash +4. Verify it worked: Check that security.py, with `ls` or check your file explorer in VSCode, now exists and check that the commit has been added to the main branch with `git log --oneline --graph --all` +5. Find the performance fix commit hash - Look for "Fix performance issue with data caching" - Note its hash -5. Cherry-pick the performance fix: +6. Cherry-pick the performance fix: ```pwsh git cherry-pick ``` -6. Verify both fixes are now on main: +7. Verify both fixes are now on main: ```pwsh # You should see both security.py and cache.py ls diff --git a/01-essentials/06-revert/README.md b/01-essentials/06-revert/README.md index 38a12d0..e2e4ee4 100644 --- a/01-essentials/06-revert/README.md +++ b/01-essentials/06-revert/README.md @@ -52,6 +52,9 @@ You're working on a calculator application. A developer added a `divide` functio 1. **Navigate to the challenge directory:** ```pwsh cd challenge + + # and check the contents. We should notice that divide.py exists, this will be reverted + ls ``` 2. **Check which branch you're on** (you should be on `regular-revert`): diff --git a/01-essentials/08-multiplayer/README.md b/01-essentials/08-multiplayer/README.md index 60b9022..a388451 100644 --- a/01-essentials/08-multiplayer/README.md +++ b/01-essentials/08-multiplayer/README.md @@ -56,7 +56,7 @@ This creates a new branch and switches to it. ```powershell git add . git commit -m "fix: move 7 to correct position" -git push feature-2 +git push ``` Your branch is now on Azure DevOps. diff --git a/util.ps1 b/util.ps1 index aee2067..2ac8934 100644 --- a/util.ps1 +++ b/util.ps1 @@ -1,3 +1,8 @@ +<# +.SYNOPSIS + Utility functions for writing to stdout and for advanced git commands that are reused again and again +#> + function Write-Pass { param([string]$Message) Write-Host "[PASS] $Message" -ForegroundColor Green