Alex Bepple

0 notes &

Converting a Bazaar repository to Git

I keep all of my notes in thousands of plain text files in one directory, and version them using Bazaar. Being fed up with Bazaar’s sluggishness – for instance, it makes me wait a couple of seconds for a simple bzr status – I decided to migrate to Git.

I first tried Tailor because Jeff Hodges was favorably impressed by it. Unfortunately it kept nagging me about some branch parameter. Having a fresh repo as a target, it was not obvious to me how to proceed. So I turned to Google for alternatives.

And so I discovered git fast-import and its Bazaar counterpart, bzr fast-export. This description looked sufficiently straight forward. But in fact it’s even easier. From the Bazaar working tree I did:

sudo apt-get install bzr-fastimport
git init .
bzr fast-export . | git fast-import

This left the working tree dirty, even though it had been clean before. So after

git reset --hard

I was done.

Filed under git bazaar