March 09, 2021
git stash

I just had a senior moment and couldn't remember how to use git stash. Like... not at all. Completely blanked. The little icon in the VCS indicator (in iTerm2) was driving me crazy with it's little smug 1.

git stash

Just so I don't forget again, here's the basic usage:

List stashes

git stash list

Remove a specific stash

  1. Run git stash list to see what you've got stashed away
  2. Pick the stash you want to remove from the list
  3. Run git stash drop [email protected]{2} - with the @{2} being the index of the stash you want to get rid of

Remove all stashed entries

git stash clear