I had to convert the Mercurial (hg) repository to Git repository, and by lot of advises on the Internet, I’ve decided to use Fast Export.
Clone Fast Export
Create a new repository
1 2 3
Problems running Fast Export
Getting to know Python with the Mercurial
By running Fast Export I got error message:
Essentially this means that Python does not know about Mercurial.
The fix for that would be to install Mercurial as a Python module. I’ve used
Using “force” option
The next error was:
To fix it there was need to set Fast Export with parameter
Starting Fast Export
Make sure you are in the Git repository that you want to convert to:
Run from it a Fast Export like this:
Assumes that the Fast Export in directory up and the
hg_repois the Mercurial repository directory from where you want to convert from!
After few moments, your Mercurial (hg) repository will be converted to Git one!
And aftrer the conversion is applied run the checkout:
Beware if you have a lots of branches, that pushing
master will only push master. To push evrything to the remote
And now all commits and previous branches are converted to Git!