---
title: Converting projects between Git and Bazaar
description: Here in the design team we use both Bazaar and Git to keep track our
  projects’ hostory. We quite often end up coverting our projects from Bazaar to Git
  or vice-versa. Here are some tips on how to do that. To convert revision history
  between Git and Bazaar, we will use their respective fast–import features.  […]
url: https://canonical.com/blog/converting-projects-between-git-and-bazaar
---

1. [Blog](https://canonical.com/blog)
2. Article

---

[Robin Winslow](https://canonical.com/blog/author/nottrobin "More about Robin Winslow")

27 January 2015

# Converting projects between Git and Bazaar

[Design](https://canonical.com/blog/tag/design)

---

Share the article

Here in the [design team](http://design.canonical.com/team/) we use both [Bazaar](http://en.wikipedia.org/wiki/GNU_Bazaar) and [Git](http://git-scm.com/) to keep track our projects’ hostory.

We quite often end up coverting our projects from Bazaar to Git or vice-versa. Here are some tips on how to do that.

To convert revision history between Git and Bazaar, we will use their respective [fast](http://wiki.bazaar.canonical.com/BzrFastImport)–[import](https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html) features.

## Install `bzr-fastimport`

In either case, you need the `fastimport` plugin for Bazaar, which installs both `bzr fast-import` and `bzr fast-export`:

## Bazaar to Git

To convert a Bazaar branch to Git, open a Bazaar branch of your project and do the following:

Now you should have all the revision history for that Bazaar branch in Git:

(From [Astrofloyd’s blog](http://astrofloyd.wordpress.com/2012/09/06/convert-bzr-to-git/))

## Git to Bazaar

Converting from Git to Bazaar is slightly different. Because Bazaar stores branches in sub-folders, while Git stores branches all in the same directory, when you convert a Git repository to Bazaar, it will create a directory tree for the branches:

`bzr-repo` will now contain a folder for each branch that was in your Git repository. You’re probably most interested in `trunk`, which will be at `bzr-repo/trunk`, or perhaps `bzr-repo/trunk.remote`:

(From [the Bazaar wiki](http://wiki.bazaar.canonical.com/Scenarios/ConvertFromGit))

## Keeping a project in both Git and Bazaar

You may wish to keep a project in both Git and Bazaar.

### Create ignore files for both systems

As your project may be used in either Git or Bazaar, you should create practically duplicate [`.gitignore`](https://help.github.com/articles/ignoring-files) and `.bzrignore` files, the only difference being that the `.bzrignore` should ignore the `.git` directory, and the `.gitignore` should ignore the `.bzr` directory. You should also make sure you ignore the `bzr-repo` directory – e.g.:

And keep both ignore files in all versions of the project.

### Only work in one repository

It is not practical to be doing your actual work in both systems, because converting from one to the other will overwrite any history in the destination repository. For this reason you need to choose to do all your work in either Git or Bazaar, and then regularly convert it to the other using the above conversion instructions.

[Get in touch

Interested in running Ubuntu in your organization?](https://ubuntu.com/about/contact-us/form)

## Sign up for our newsletter

Get the latest Canonical news and updates in your inbox.

Work email:

\*I agree to receive information about Canonical's
products and services.

In submitting this form, I confirm that I have read and agree to
[Canonical's Privacy Notice](https://canonical.com/legal/data-privacy/contact)
and [Privacy Policy](https://canonical.com/legal/data-privacy).

Sign up

## Share on

---

## Related posts

[### From documentation to design thinking: lessons from Canonical’s Design Academy](https://canonical.com/blog/from-documentation-to-design-thinking-lessons-from-canonicals-design-academy)

Technical Authors at Canonical design experiences: they organize complex information, guide users through unfamiliar systems, and translate technical detail into something...

[Miguel Divo](https://canonical.com/blog/author/mdivo)

18 November 2026

[### Designing a better future: your guide to design contribution in Open Source](https://canonical.com/blog/designing-a-better-future-your-guide-to-design-contribution-in-open-source)

This guide covers why design matters in open source, and how designers can make a bigger impact in open source software.

[Leia Ruffini](https://canonical.com/blog/author/leiaru)

3 November 2026

[### From personas to archetypes: a living, shared understanding of the people we build for (Part 2 of 2)](https://canonical.com/blog/from-personas-to-archetypes-part-2)

This is the second of two posts on our archetypes, shared, machine-readable descriptions of the people we build for. The first covers why we needed them and what they are. This...

[Peter B. Polgár](https://canonical.com/blog/author/polgarp)

23 October 2026

[### From personas to archetypes: a living, shared understanding of the people we build for (Part 1 of 2)](https://canonical.com/blog/from-personas-to-archetypes)

Personas are easy to create but often ignored. This is the first of two posts about how we developed archetypes to keep our personas fresh at Canonical. These are shared,...

[Peter B. Polgár](https://canonical.com/blog/author/polgarp)

19 October 2026
