Last Updated: February 25, 2016
·
737
· joecritch

How to 'git stash' untracked files

Git stash is great, but it's default functionality for untracked files is often unwanted.

git stash

This will stash only tracked files with uncommitted changes.

However, if you use the following...

git stash -u

This will stash untracked files too. This is very useful if you're latest set of changes involved creating new files.