Shelving Work with git stash
You are halfway through a change and need a clean folder, for example to switch branches. git stash puts your unfinished work on a shelf and restores the last commit. Later, git stash pop brings it back.
Your edit is safe on the shelf. See what is stored, then get it back.
git stash pop restores the work and removes it from the shelf. git stash apply restores it and keeps a copy. git stash drop deletes the newest entry, and git stash -m "message" gives an entry a name. Stash only saves changes to files Git already tracks, not brand new untracked files.
What does `git stash pop` do?
app.txt is committed, then edited. Shelve the edit with git stash, then print how many entries git stash list shows.
Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.
Tip: use the left and right arrow keys to move between lessons.