Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I found an open-source project which is available via hg only.

Now I want to put it onto GitHub, with my own changes alongside the previous commit history.

Hg-git allows you to use git commands to push to hg (Mercurial).

What allows me to push hg to git?

share|improve this question
If you want to collaborate with said project, better use mercurial natively. Anything else will sooner or later become a headache for you, and get the others angry with the "outsider who just won't do things the civilized way". (I'm a big git fan myself, BTW). – vonbrand Mar 1 '13 at 17:38
up vote 1 down vote accepted

Setup your environment (once Python 2.7.*+Mercurial 2.2 are installed)

git clone
cd git-hg
git submodule update --init
cp git-hg/bin/git-hg /usr/local/bin/git-hg
cp -r git-hg/fast-export /usr/local/fast-export

Clone your hg repo

git-hg clone artigo-git

Push that to Github (or other git host)

git remote add github
git push github master


share|improve this answer
For windows, you want to go here and download the python version of the binary installer. The link will be Mercurial-2.8.1 (32-bit py2.7) or whatever the current version is. You will also need to install Python 2.7 – joe.feser Jan 9 '14 at 4:58

Side note (unrelated):

Hg-git allows you to use git commands to push to hg

is wrong impression - hg-git allow Mercurial client interact (bidirectionally) with remote Git-reposiory and can be used (if you have Mercurial) - pull from hg + push to Git

Git (client) - Hg (repository) communication can be implemented in more Git-way with Bridge support in git for mercurial and bazaar (git-remote-hg for your needs)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.