Given that I just lost a day trying to figure this out and actually found a solution with the help of a coworker, I thought I should chime in.
We have a large code base and we have to deal with 2 branch heavily being modified at the same time. There is a main branch and a secondary branch if you which.
While I merge the secondary branch into the main branch, work continues in the main branch and by the time i'm done, I can't push my changes because they are incompatible.
I therefore need to "rebase" my "merge".
This is how we finally did it :
1) make note of the SHA. ex.: c4a924d458ea0629c0d694f1b9e9576a3ecf506b
git log -1
2) Create the proper history but this will break the merge.
git rebase -s ours --preserve-merges origin/master
3) make note of the SHA. ex.: 29dd8101d78
git log -1
4) Now reset to where you were before
git reset c4a924d458ea0629c0d694f1b9e9576a3ecf506b --hard
5) Now merge the current master into your working branch
git merge origin/master
git mergetool
git commit -m"correct files
6) Now that you have the right files, but the wrong history, get the right history on top of your change with :
git reset 29dd8101d78 --soft
7) And then --amend the results in your original merge commit
git commit --amend
Voila!