Pushing to remote repository after merge "creates new remote heads" - is that bad?

You ran hg up --clean. That means you undid the merge, which means you still need to merge. You have an unresolved file when you merge. Re-read your error message:

5 files updated, 1 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon

You need to resolve the merge conflict and then complete the merge with hg resolve. Then you will have successfully merged your two heads.

And to answer your question: no, it's not bad to have two remote heads. It just means you need to merge them (preferably ASAP) before you push anything else to the remote server.

So to fix, just run hg merge, resolve the one conflict, then run hg resolve.


First: View your changes with hg log. The following didn't help in my case:

  • hg pull and hg merge (before you pull check against hg incoming)
  • or: hg pull --rebase

But this helped.

hg merge [revision]

I found that I needed to explicitly merge some revisions which looked like heads.