rightaway717
rightaway717

Reputation: 2841

git stash apply to specific files?

I have two stashes that overlap. I think that if I apply both stashes, I will have a mess, because I don't need some changes in one of the stashes. So I would like to apply one stash and then apply only changes to specific files from another stash, even better if interactively. How can I do it?

My question is different than this one suggested, because the OP of that question wants apply stash to different commits, I want to apply two stashes to my code.

Upvotes: 1

Views: 3854

Answers (1)

bnord
bnord

Reputation: 395

Apply one stash, reset the files you don't want, commit the others, apply the second stash, reset the files from the first, commit.

Upvotes: 2

Related Questions