refactor(cherry-pick): more ls commands to check content of challenge when switching branches

This commit is contained in:
Bjarke Sporring
2026-01-21 12:08:13 +01:00
parent 3a4fe8ce9e
commit 1d0003bb70

View File

@@ -52,10 +52,13 @@ First, see what commits are on the development branch:
```pwsh
cd challenge
# View all commits on development branch
git log --oneline development
# First let's see what files are in the current branch and notice that there is a file security.py
ls
# View the full commit graph
# View all commits on development branch
git log --oneline --graph
# View the full commit graph for all branches
git log --oneline --graph --all
```
@@ -87,6 +90,9 @@ git switch main
# Verify you're on main
git branch
# See what files exist. Notice that we no longer have a security.py file
ls
```
The `*` should be next to `main`.
@@ -96,8 +102,6 @@ The `*` should be next to `main`.
# See main's commits
git log --oneline
# See what files exist
ls
```
Main should only have the initial app and README - no bug fixes yet, no experimental features.
@@ -110,26 +114,24 @@ 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. 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:
2. Cherry-pick the security fix:
```pwsh
git cherry-pick <security-fix-hash>
# Example if the hash is abc1234:
# git cherry-pick abc1234
```
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
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
- Look for "Fix performance issue with data caching"
- Note its hash
6. Cherry-pick the performance fix:
5. Cherry-pick the performance fix:
```pwsh
git cherry-pick <performance-fix-hash>
```
7. Verify both fixes are now on main:
6. Verify both fixes are now on main:
```pwsh
# You should see both security.py and cache.py
ls