Skip to content

Import Mercurial to Git

jordanell edited this page May 2, 2012 · 1 revision

Requirements:

  • Direct file system access to a copy of the Mercurial repository
  • Python 2.4 or later up to 2.X (Will not run on python 3.X)
  • Install Mercurial (sudo apt-get install mercurial)
  • Install Git version 1.5.4.4 or later (sudo apt-get install git)

Process:

  1. Run in Linux, preferably Ubuntu

  2. Open up a terminal and navigate to the utils folder of this project

  3. Run the command mercurialtogit.sh as follows: ./mercurialtogit.sh [MERCURIAL REPO] where MERCURIAL REPO is the path to your local copy of the Mercurial repository you wish to convert to git. NOTE: This process can take a very, very long time (hours to days) to execute depending on the size of your repository.

  4. After the process is completed you will have a bare git repository in the temp/mercurialConverted folder of this project.

Refs: http://hivelogic.com/articles/converting-from-mercurial-to-git/

Clone this wiki locally