ict.ken.be

Delivering solid user friendly software solutions since the dawn of time.

Export Mercurial into Git

Categories: Git Mercurial

How sad that I have to write this post... proves once more that it's all about the marketing and communication, not so much the product.

Anyway, here how you can import your hg history into git using TortoiseHg

  • TortoiseHg > Global Settings > Extensions > Enable hggit
  • create a new git repo : git init --bare .git OR  git clone --bare https://git.ken.be/my-new-repo
  • cd to your hg repository and you might create a bookmark : hg bookmarks hg
  • hg push c:/path/to/your/new/git/repo
  • cd to your git repo
  • if you used init before: git config --bool core.bare false (when you used bare command before)
  • if you used a bookmark merge hg branch into master
  • push changes to remote repository
  • delete local version and get a normal clone.

And you have a new git repo with all your hg history in it. Awesome.

Or not so awesome: https://www.youtube.com/watch?v=CDeG4S-mJts