tldr/pages/common/git-stash.md

24 lines
396 B
Markdown
Raw Normal View History

2013-12-09 11:12:24 +00:00
# git stash
> Stash local Git changes in a temporary area
- stash current changes (except new files)
`git stash {{optional_stash_name}}`
- include new files in the stash (leaves the index completely clean)
`git stash -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}}`