1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 19:45:09 +02:00
tldr/pages/common/git-stash.md
2016-01-08 09:38:59 +01:00

27 lines
473 B
Markdown

# git stash
> Stash local Git changes in a temporary area.
- Stash current changes (except new files):
`git stash save {{optional_stash_name}}`
- Include new files in the stash (leaves the index completely clean):
`git stash save -u {{optional_stash_name}}`
- List all stashes:
`git stash list`
- Re-apply the latest stash:
`git stash pop`
- Re-apply a stash by name:
`git stash apply {{stash_name}}`
- Drop a stash by an index:
`git stash drop stash@{index}`