Overview
A complete interruption workflow is:
- Confirm the current modifications.
git status
- Stash the unfinished work.
git stash
- Verify that the working directory is ready for switching.
git status
- Switch to the urgent branch.
git checkout development
- Complete the review or task.
- Return to the original branch.
git checkout main
- Restore the unfinished work.
git stash pop
- Continue editing, then stage and commit when the work is complete.
To preserve the stash after restoration, replace pop with apply:
git stash apply