Skip to content

Instantly share code, notes, and snippets.

@gringoh
Last active May 12, 2021 13:39
Show Gist options
  • Save gringoh/0c6ac6db0d321ab33d5f416922019270 to your computer and use it in GitHub Desktop.
Save gringoh/0c6ac6db0d321ab33d5f416922019270 to your computer and use it in GitHub Desktop.
[Git: Stash unstaged changes] #git

Git: Stash unstaged changes

This will stash all modifications that you did not git add:

git stash -k

Note that newly created (and non-added) files will remain in your working directory unless you also use the -u switch.

git stash -k -u

Also, your working directory must be clean (i.e. all changes need to be added) when you git stash pop later on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment