Stash only certain files
To stash only certain files, add the ones that you want to keep out of the stash and run git stash --keep-index
:
Create 4 sample files
$ touch file1.txt file2.txt file3.txt file4.txt
Add the files that you want to keep out of the stash
$ git add file1.txt file2.txt
Stash remaining files
$ git stash --keep-index
Written by Juan G. Hurtado
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#