git stashSaves your uncommitted changes (both staged and unstaged modifications to tracked files) to a stack and reverts your working directory to the last commit. This lets you pause work-in-progress without making a messy commit.
git stash listShows all saved stashes in the stack. Each entry has a message and an index (stash@{0} for the most recent).
git stash popRestores the most recent stash and removes it from the stack. The changes are applied back to your working directory and staging area.
Check the current state
app.py has uncommitted modifications — you were in the middle of adding a feature when a bug report came in. The changes aren't ready to commit, but you need a clean working directory.
● Check the current state
○ Stash your changes
○ Verify the working tree is clean
○ List your stashes
○ Restore your stashed changes
○ Verify the changes are back
Terminal
📘 Starting tutorial: Git Stash
Save uncommitted work with git stash and restore it later