tweak: expand upon some explanations
This commit is contained in:
@@ -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"
|
- Look for a commit message like "Fix security vulnerability in input validation"
|
||||||
- Note its hash (first 7 characters)
|
- 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
|
```pwsh
|
||||||
git cherry-pick <security-fix-hash>
|
git cherry-pick <security-fix-hash>
|
||||||
|
|
||||||
# Example if the hash is abc1234:
|
# Example if the hash is abc1234:
|
||||||
# git cherry-pick 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. 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
|
5. Find the performance fix commit hash
|
||||||
- Look for "Fix performance issue with data caching"
|
- Look for "Fix performance issue with data caching"
|
||||||
- Note its hash
|
- Note its hash
|
||||||
|
|
||||||
5. Cherry-pick the performance fix:
|
6. Cherry-pick the performance fix:
|
||||||
```pwsh
|
```pwsh
|
||||||
git cherry-pick <performance-fix-hash>
|
git cherry-pick <performance-fix-hash>
|
||||||
```
|
```
|
||||||
|
|
||||||
6. Verify both fixes are now on main:
|
7. Verify both fixes are now on main:
|
||||||
```pwsh
|
```pwsh
|
||||||
# You should see both security.py and cache.py
|
# You should see both security.py and cache.py
|
||||||
ls
|
ls
|
||||||
|
|||||||
@@ -52,6 +52,9 @@ You're working on a calculator application. A developer added a `divide` functio
|
|||||||
1. **Navigate to the challenge directory:**
|
1. **Navigate to the challenge directory:**
|
||||||
```pwsh
|
```pwsh
|
||||||
cd challenge
|
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`):
|
2. **Check which branch you're on** (you should be on `regular-revert`):
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ This creates a new branch and switches to it.
|
|||||||
```powershell
|
```powershell
|
||||||
git add .
|
git add .
|
||||||
git commit -m "fix: move 7 to correct position"
|
git commit -m "fix: move 7 to correct position"
|
||||||
git push feature-2
|
git push
|
||||||
```
|
```
|
||||||
|
|
||||||
Your branch is now on Azure DevOps.
|
Your branch is now on Azure DevOps.
|
||||||
|
|||||||
5
util.ps1
5
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 {
|
function Write-Pass {
|
||||||
param([string]$Message)
|
param([string]$Message)
|
||||||
Write-Host "[PASS] $Message" -ForegroundColor Green
|
Write-Host "[PASS] $Message" -ForegroundColor Green
|
||||||
|
|||||||
Reference in New Issue
Block a user