1

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.

2

1 Answer 1

2

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

2
  • The problem is that I have changes in both stashes to some same files, and I want them both, but they are conflicting. I don't mean that I want changes to only specific files from specific stash Commented Apr 20, 2016 at 14:02
  • Apply the first, commit, apply the second (you will need to specify the stash), you will get a merge conflict if there are conflicting edits just like when merging, clean up the conflicts, commit.
    – bnord
    Commented Apr 20, 2016 at 14:12

Not the answer you're looking for? Browse other questions tagged or ask your own question.