Manuals / Git & GitHub / Chapter 7
B · Collaborate · intermediate · Day 5 · Chapter 7 of 12
Stash & conflict resolution
git stash saves WIP without committing. Conflicts: read markers, choose wisely, test after resolve.
Path progress53%
Step 1 of 3
Stash WIP
git stash push -m "wip login". Switch branches. git stash pop to restore.
Example
git stash push -m "wip"
git switch main
# do other work
git switch feature
git stash popDo this now
Start edit, stash, switch branch, return, pop.
Was this step clear?
Chapter learning outcomes
- git stash / pop
- Conflict markers
- Merge tool basics
- Post-resolve verification
Clear these before you leave
Side quest
Stash list
Create 2 stashes. git stash list. Apply selectively.