Git: Save Working Tree in a Temp Storage: git stash

By Xah Lee. Date:

you can save your current working dir into a temp storage. Do this:

# save working dir (all uncommitted changes) in a temp storage
git stash save

after you do this, the working tree will be clean.

to get it back, do:

# retrieve from stash
git stash pop

To list all your stash, do:

git stash list

for more detail, see man git-stash.

If you have a question, put $5 at patreon and message me.

git

  1. Install git
  2. Git Basics
  3. Git Ignore File
  4. Commit Files
  5. Push to Server
  6. Pull from Server
  7. Find Difference
  8. View Log
  9. Revert Change
  10. Branching
  11. Temp Save: git stash
  12. What's HEAD
  13. FAQ