Take the 2-minute tour ×

With git svn clone I can work on a subversion repository using git. Is there a similar way to work on Mercurial (hg) repositories?

share|improve this question
possible duplicate of Git interoperability with a Mercurial Repository –  poke Mar 7 '11 at 21:49
Title is closer match to stackoverflow.com/questions/1389307/… –  wnoise Mar 7 '11 at 22:23

3 Answers 3

up vote 14 down vote accepted

There isn't anything built in.

You can use git-hg however, which I use a lot and works great for pulling hg repos and updates to a git repo, but the downside of it is that you cannot push updates made to your git repo to a hg repo with git-hg.

share|improve this answer
Thanks for that answer. Only pulling will probably work for me, since I was just interested in looking at source code for Mockito (which is in Mercurial) –  Jesper Rønn-Jensen Mar 8 '11 at 9:09
i am affraid tha git-hg is error prone... –  hugemeow Sep 4 '12 at 15:55
This answer is out of date. A bridge is now integrated in Git, and works fine –  CharlesB Apr 9 at 9:02
@CharlesB +1 and thanks for this hint. It comes with Ubuntu 14.04 LTS and Debian wheezy-backports these days, but is not active by default. Look into /usr/share/doc/git/contrib/remote-helpers/ for the scripts to copy them somewhere into $PATH –  Tino Jun 19 at 23:57

The Mercurial extension hg-git is another way to go in the Hg->Git direction. If you just want to go in that direction, so far as I can see, it and git-hg both work well. More details here.

share|improve this answer

If it was the other case, I mean if you need a git->hg conversion you can use mercurial's convert extension. But for your question git-hg should do fine

share|improve this answer

Your Answer


