schacon / hg-git

mercurial to git bridge, pushed to directly from the hg-git plugin in Hg
GNU General Public License v2.0
620 stars 72 forks source link

"abort: pushing refs/heads/master overwrites X" after moving the master bookmark to an older changeset #301

Open elifarley opened 9 years ago

elifarley commented 9 years ago

Since "hg strip" currently doesn't play well with hg-git, I've tried a hack to get rid of some changesets:

After pushing my changesets to Github, I moved my local Hg repo's master bookmark to the first changeset (-r 0) and tried "hg push -B master", hoping that all changesets after that would be garbage collected by Github.

Here's the error message I got: abort: pushing refs/heads/master overwrites caf2bae34c4f

moswald commented 8 years ago

I just got this one myself, but I have no idea how I did it. I didn't run strip, although I did perform a rebase. Could that have caused it?

ellwoods commented 7 years ago

The solution from here worked for me http://stackoverflow.com/questions/14175561/hg-git-stopped-working-for-multiple-branches