I have total 30 files and I have made changes in 15 files. Out of those files I have to make 2 stash. The first stash will have some files and in another stash, I need the other files. Also, there will be some files which I will never stash. I know how to stash single file or whole. I need the way to stash multiple files out of all
Asked
Active
Viewed 1,842 times
1 Answers
0
What I generally do is stash all the changes, then apply the stash and checkout the files I don't need and stash again (with a name perhaps).
git stash save all_changes
git stash apply
git checkout <unnecessary_files1>
git stash save stash1
git stash apply all_changes
git checkout <unncessary_files2>
git stash save stash2
Or you could stage the changes you want to keep in stash and use stash -k
to stash them.

hspandher
- 15,934
- 2
- 32
- 45