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