Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== git stash ====== * create a stash<code>git stash save ["name of stash"]</code> * view list of stashes<code>git stash list</code> * view diff of stash<code>git stash show --unified stash@{0}</code> * see which commit the stash was based on (note if you don't give a stash a specific custom name, it tells you this in the name by default)<code>git show-branch master stash@{0}</code> * apply stash to current working directory, removing the stash if successful<code>git stash pop [optional stash reference such as stash@{0}]</code> * delete a stash<code>git stash drop [optional stash reference]</code> ===== tips ===== * I prefer to make branches, then just type git stash save; then, when I run git stash list it shows me WIP on <branchname> so I know what that stash was about, rather than staying on master and naming a stash * I prefer bash aliases for working with stashes * gss = git stash save * gsl = git stash list * gsp = git stash pop * gsa = git stash apply docs/git/stash.txt Last modified: 2012/11/14 16:20by billh