soupy1976
soupy1976

Reputation: 2845

Mercurial - "push creates new remote head" when branch is closed

I have the following situation:

I have some changes on a branch, and another dev had closed and pushed the same branch.

When I tried to push I got the "push creates new remote head" message, but when I pulled there was nothing to pull, and when I attempted to merge I got the message that the branch only had one head.

Upvotes: 3

Views: 967

Answers (1)

soupy1976
soupy1976

Reputation: 2845

The solution to this problem was to merge, but specify a revision using -r

I merged to the revision where my colleague had closed the branch, and then I was able to commit and push and all was good again.

The issue was that mercurial will not merge with a closed head, unless you specify the revision.

When searching SO I couldn't find this specific problem with this solution, so I thought worth adding in the hope that it will help someone else.

Upvotes: 3

Related Questions