How to resolve "delete/modify" conflict caused by "git stash apply"

You are popping the stash onto a different state; state that has one additional commit. And worse, the commit has introduced merge conflicts, as you know.

You have two options:

  1. pop that stash onto the latest commit and resolve the conflicts
  2. pop the stash onto the prior commit.

Sounds like #2 is what you want to do. Use:

    git stash branch new_branch [<stash>]  # <stash> will be the last one if not provided.

This worked for me.

Do a-

git mergetool

Then you would be asked to pick the modified or deleted file or abort, and after this do one more time-

git mergetool

This would resolve the merge conflict and you can stash pop your changes.

Tags:

Git