pengbai/docker-mercurial2git
A mercurial to git converter, m2g
115
Thanks for the contribution of Arnaud ADAM!
Here is a migration guide to help you with! :smile:
In your WORKSPACE, create a subdirectory named m2g, and in this subdirectory, checkout your mercurial repository into a directory (the name doesn't matter, it will be my-hg-project here), create an empty directory (which will contain you git project sources). for this example, I'll take my-git-project.
$ docker run -it --rm -v WORKSPACE/m2g:/home/m2g pengbai/docker-mercurial2git
$ cd m2g/my-git-project
$ git init
Initialized empty Git repository in /home/m2g/my-git-project/.git/
$ /home/fast-export/hg-fast-export.sh -r ../my-hg-project
In theory, you'll see a bunch of logs on your screen. Migration can take a while...
$ git checkout HEAD
$ git remote add origin https://github.com/xxxx/my-git-project.git
$ git push origin --all
That's all! :sunglasses: You're now able to work with your 'git' project.
You can now exit your docker container, and delete the m2g folder (since you're now able to clone your repository anywhere you want!).
Please note that :
Have fun! :+1:
docker pull pengbai/docker-mercurial2git