After screwing around with Magit rebasing, I ended up with a commit that includes a bunch of diff markers in a file[1]:

<<<<<<< HEAD

<<<<<<< variant A
>>>>>>> variant B

======= end
>>>>>>> f8e1563... Stuff

Apparently this is a "nested conflict" that smerge can't resolve. Is there a way to use one of Emacs' diff tools to get rid of this, or do I just need to edit it by hand?

Fortunately, there's only a few. Nonetheless, it's unfortunate that commits are allowed to get into a "bad state" such as this.

[1]: I believe this is because I forgot to stage before continuing a rebase

1 Answer 1


If it's in an inconsistent state, I don't think you'd want automated tools to guess at how to resolve it (just like you don't want tools to automatically resolve normal merge conflicts, unless you've explicitly told them how to do it), as they'll have no basis for making such a decision.

Fix them by hand -- and be careful about telling git that conflicts are resolved if they are not resolved, as otherwise you can indeed commit conflict markers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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