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.

Sign up to request clarification or add additional context in comments.

2 Comments

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
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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.