Skip to main content

git-stash-typical-usage

Date created: 2024-09-26

Typical usage

Named stash (stash with message)

$ git stash -m 'stash message'

Stash including untracked files

$ git stash -u -m 'stash message'

List stashes, and take note of the index of the one you need

$ git stash list

Apply unstashes a stash, but keeps the stash

$ git stash apply <index-of-stash-to-apply>

Pop unstashes a stash, and removes it from the list of stashes

$ git stash pop <index-of-stash-to-apply>