Its all about Ruby On Rails
Export Mercurial(Hg) repository to git repository
I have been using a git from quite a some time. But there was a project for which we were using Mercurial(Hg).
We decided to move it’s repository to github, after spending some time on google I found many articles but unfortunately none of them worked for me.
But, Finally I managed to move it from Hg to Git.
Following are the steps I followed:
- git clone git://repo.or.cz/fast-export.git
- mkdir new_git_repo
- cd new_git_repo
- git init
- /path/to/hg-fast-export.sh -r /path/to/hg_repo #hg-fast-export.sh in the clone of step 1
- git-repack -a -d -f
- git checkout BRANCH_NAME # BRANCH_NAME is the name of Hg branch, in my case it was ‘trunk’
It worked for me very well, hope same to you guys…
| Print article | This entry was posted by Akhil Bansal on February 19, 2009 at 8:41 pm, and is filed under Mercurial, git, hg. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |