Migration Mercurial to git

Migration mercurial to git

Clone the old repo

hg clone http://safematix.com/hg mercurial-repo

create a file name my-filemap with

exclude path/to/.git

Convert the old repo to a new Mercurial repo without git folders

hg convert --filemap my-filemap mercurial-repo/ new_mercurial-repo

create the new git repo

mkdir git
cd git
git init

Convert the Mercurial to git

/usr/bin/hg-fast-export -r ../new_mercurial-repo

Check the new git repo

git fsck

If all is okay

git checkout HEAD
git remote add origin git@safematix.com:GROUP/PROJECT.git
git push -u origin master