How to migrate a Mercurial code repository to Git

Posted on by

A very easy way to convert a Mercurial repository to Git is by using the fast-exportscript:

cd ~
git clone git://repo.or.cz/fast-export.git
git init git_repo
cd git_repo
git config core.ignoreCase false
~/fast-export/hg-fast-export.sh -r /path/to/old/mercurial_repo
git checkout HEAD

If you have some special requirements you might want to have a look at the comments in this StackOverflow answer:
http://stackoverflow.com/a/16037861/111430

Comments

Leave a comment

Your email address will not be published.
Required fields are marked *