We have a large bazaar repository and we want to convert it to a git repository. The bazaar repository contains the folders of each of the interns. Any documentation/code prepared by interns is committed in their directory so there are a huge number of commits.

What steps should be performed to securely convert the bazaar repository to a git repository so that we do not lose any commit information.

We firstly need to create a backup of the existing bazaar repository and then convert it.

Edit: I followed this link: http://librelist.com/browser//cville/2010/2/9/migrate-repository-bzr-to-git/

It's working fine on my system with Ubuntu. But when I try to run it on the actual server it gives me EOF error and crashes

Starting export of 1036 revisions ...
fatal: EOF in data (1825 bytes remaining)
fast-import: dumping crash report to .git/fast_import_crash_11804

Edit 2: I also tried it on a new CentOS system and received the following error

fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions

Look at https://github.com/termie/git-bzr-ng. It's a little old but worked fine for me to fork a launchpad project in github. Simply import all bzr branches and push on your remote git server. I recommend using bzr2.2, it was buggy when I tried with newer verion of bzr.

  • Thanks for the tips. Which version of bzr and git-bzr-ng did you try it with? What bugs did you encounter? – nealmcb Dec 24 '13 at 0:09
  • github.com/felipec/git-remote-bzr seems to be the version provided in distributions now. – Jan Hudec Jul 28 '14 at 9:11

Currently Debian provides the integration via git-remote-bzr package, which lists as it's homepage https://github.com/felipec/git-remote-bzr.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.