How to convert a mercurial (hg) repository to git

published on
The easiest way to convert from mercurial (aka hg) to git is by using hg-fast-export on ubuntu. If you dont have ubnutu, then you can spin up a server on Digital Ocean for a few cents. If you have issues with any of the below commands, try prefixing with sudo to elevate privileges. Install git & mercurial First we need to install Git and Mercurial: sudo apt-get install git mercurial -y Clone hg-fast-export The hg-fast-export converter is run directly from its repo so we will need to clone it locally. Read More...