Compare commits
2 Commits
9659d82d2a
...
c20041efde
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c20041efde | ||
|
|
84ed357feb |
@@ -95,7 +95,8 @@ Suddenly, your teammate reports a **critical security bug** in production! You n
|
||||
|
||||
2. **Check your current status:**
|
||||
```pwsh
|
||||
git status
|
||||
git status # See which files are changed
|
||||
git diff # See all the changes in a diffview
|
||||
```
|
||||
You should see modified `login.py` (uncommitted changes)
|
||||
|
||||
@@ -116,15 +117,12 @@ Suddenly, your teammate reports a **critical security bug** in production! You n
|
||||
```
|
||||
|
||||
6. **Open app.py and find the bug:**
|
||||
```pwsh
|
||||
cat app.py
|
||||
```
|
||||
Look for the comment "# BUG: This allows unauthenticated access!"
|
||||
|
||||
7. **Fix the bug** by editing app.py:
|
||||
- Remove the buggy comment line
|
||||
- You can leave the implementation as-is or improve it
|
||||
- The important thing is removing the comment that says "allows unauthenticated access"
|
||||
- The important thing is removing the comment that says "BUG: This allows unauthenticated access"
|
||||
|
||||
8. **Commit the fix:**
|
||||
```pwsh
|
||||
@@ -143,10 +141,8 @@ Suddenly, your teammate reports a **critical security bug** in production! You n
|
||||
```
|
||||
This applies the stash and removes it from the stash stack
|
||||
|
||||
11. **Complete the TODOs in login.py:**
|
||||
11. **Remove all the TODOs in login.py:**
|
||||
- Open login.py in your editor
|
||||
- Complete the login method (verify password and return session)
|
||||
- Add a logout method
|
||||
- Remove all TODO comments
|
||||
|
||||
12. **Commit your completed feature:**
|
||||
@@ -194,10 +190,7 @@ git stash pop
|
||||
git stash apply
|
||||
|
||||
# Apply a specific stash
|
||||
git stash apply stash@{1}
|
||||
|
||||
# Apply a specific stash by number
|
||||
git stash apply 1
|
||||
git stash apply "stash@{1}"
|
||||
```
|
||||
|
||||
### Managing Stashes
|
||||
@@ -207,7 +200,7 @@ git stash apply 1
|
||||
git stash drop
|
||||
|
||||
# Drop a specific stash
|
||||
git stash drop stash@{1}
|
||||
git stash drop "stash@{1}"
|
||||
|
||||
# Clear all stashes
|
||||
git stash clear
|
||||
@@ -293,10 +286,10 @@ git stash pop
|
||||
git stash list
|
||||
|
||||
# Show summary of what changed
|
||||
git stash show stash@{0}
|
||||
git stash show "stash@{0}"
|
||||
|
||||
# Show full diff
|
||||
git stash show -p stash@{0}
|
||||
git stash show -p "stash@{0}"
|
||||
```
|
||||
|
||||
### "Stash conflicts when I apply"
|
||||
|
||||
Reference in New Issue
Block a user