1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2024-11-02 09:17:57 +01:00
tldr/pages/common/git-stash.md

28 lines
466 B
Markdown
Raw Normal View History

2013-12-09 12:12:24 +01:00
# git stash
> Stash local Git changes in a temporary area
- stash current changes (except new files)
`git stash save {{optional_stash_name}}`
2013-12-09 12:12:24 +01:00
- include new files in the stash (leaves the index completely clean)
`git stash save -u {{optional_stash_name}}`
2013-12-09 12:12:24 +01:00
- 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}}`
2014-05-24 22:05:35 +02:00
- drop a stash by an index
`git stash drop stash@{index}`