Converting Hg repositories to Git

By on October 5, 2011

Bitbucket launched Git support on Monday and now that things have settled in, there has been great response from the community and plenty of questions.

One of the questions that has gained the most attention is, “How can I convert my existing Mercurial (Hg) repos to Git?”

We have an answer! Shahar Evron has done an awesome job of writing up a tutorial on converting from Hg to Git. The steps involve:

  1. renaming your Hg repositories
  2. install the HgGit plugin
  3. push the code into your Git repository
  4. switch your local repo to Git

Check out the full tutorial detailing how to convert your hg repositories to git and be done in no time!

  • http://przemoc.net/ przemoc

    HgGit is slow and introduces its own commits, which is unacceptable for many users. I suggest, just as PSyton in comment to linked tutorial, using hg-fast-export, which is a much better solution.

  • http://przemoc.net/ przemoc

    HgGit is slow and introduces its own commits, which is unacceptable for many users. I suggest, just as PSyton in comment to linked tutorial, using hg-fast-export, which is a much better solution.

  • http://przemoc.net/ przemoc

    HgGit is slow and introduces its own commits, which is unacceptable for many users. I suggest, just as PSyton in comment to linked tutorial, using hg-fast-export, which is a much better solution.

  • Lorenzo Petrone

    Maybe I’m missing something, but how does this preserves the project users, issues, wiki, and so on?
    This looks more like a generic “convert an hg repo to git”, but coming from a repository host I’d expect at least to _consider_ this problem…

  • Steve

    +1 for hg-fast-export

  • Carlos Romero