James Patterson

programmer, photographer, cinema lover, geek

Filtering by Category: Source Control

Converting a Mercurial Repository to Git within Windows

Recently I was given a Mercurial repository for an old project. I wanted to create an orphan branch to begin a completely new version of the project, which would share no code, but I found I was unable to do this in Mercurial. To be honest, from the moment I knew it was a Mercurial repository I wanted to convert it to Git but I thought this gave me more of an excuse.

When investigating whether I could do this (as with most problems, I assume I'm not the first to have it) there was a lot of chat online about fast-export. Fast-export is a python script which does all the work for you. Now how do you go about using it? There's a lot of documentation online but just not for Windows users.

Anyway, after a bit of searching around I found a great step-by-step guide on Stack Overflow. It's the best explanation I've seen, it gets to the point while covering the whole process.

Click here to go to the solution on Stack Overflow.

© 2017 James Patterson