0

I stashed my changes to rebase and amend a commit.

After rebasing, I deleted a file, staged it and the ran commit --amend

Unfortunately the file in question had been modified when I stashed the work.

Now after rebase --continue I can't stash apply because it has conflicts.

deleted in updated upstream and modified in stashed changes

How should I fix it?

SQB
  • 3,926
  • 2
  • 28
  • 49
MTVS
  • 2,046
  • 5
  • 26
  • 37
  • There's probably an easier way, but you could try [exporting your stash as a patch](http://stackoverflow.com/questions/2160638/how-can-i-format-patch-with-what-i-stash-away) and then applying the patch. – Roman Nov 05 '14 at 15:57

1 Answers1

0

Resolve the conflict just as you would a merge conflict:

Following a merge of branch_two into branch_one, a file that was deleted in branch_one and modified in branch_two will be placed into the working tree, and shown in git status with the label deleted by us.

You can git add (or git rm) the file to mark resolution either way.

If you decide to git add, you can remove the file from your index while keeping it in your working tree with git reset HEAD <file>, just as you would ordinarily.

Thomas Foster
  • 301
  • 1
  • 4