1

I'm trying to overwrite a GitHub repository with my local repository, using Mercurial only.

I'm trying to follow these steps: https://help.github.com/articles/changing-author-info/

(summarized)
1. Clone,
2. In Git-Bash, execute a git filter-branch script that changes author info,
3. git push --force --tags origin 'refs/heads/*'

I managed to update the author info (step 2) using hg convert:

(summarized)
- Enable the hgext.convert extension,
- Create a text file authors.convert.list with lines like old author info = new author info,
- hg convert --authors authors.convert.list .

I'm stuck at step 3. When I execute hg push --force I get the following error that I can't seem to force my way around:

abort: branch 'refs/heads/master' changed on the server, please pull and merge before pushing

Community
  • 1
  • 1
Mark Jeronimus
  • 9,278
  • 3
  • 37
  • 50

1 Answers1

2

Short answer

You can't do it in Mercurial: pushed history is immutable (even if push will be successful)

Longer answer

In order to easy manipulate and cheat pushed history you have to

  • have
  • enable
  • use Evolve extension (on both sides, which is impossible for GitHub's remotes)
Lazy Badger
  • 94,711
  • 9
  • 78
  • 110