diff --git a/osx/git-stash.md b/osx/git-stash.md new file mode 100644 index 0000000000..afdc15ffbb --- /dev/null +++ b/osx/git-stash.md @@ -0,0 +1,23 @@ +# 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}}`