We quite often end up coverting our projects from Bazaar to Git or vice-versa. Here are some tips on how to do that.
In either case, you need the
fastimport plugin for Bazaar, which installs both
bzr fast-import and
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)
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
(From the Bazaar wiki)
You may wish to keep a project in both Git and Bazaar.
As your project may be used in either Git or Bazaar, you should create practically duplicate
.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.
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.
Interested in running Ubuntu Desktop in your organisation?
Hands up if you or someone in your team work remotely. I am sure there are many of you out there. One of the biggest growing trends, since I started working in the technology industry 15 years ago, is how common and accessible working from…
Snapcraft squad Report a Snap Last year, a snap was found in the Snap Store using computing resources for bitcoin mining without user consent. This software was retired from the Store after further investigation and highlighted the need…
Updating the design of the Ubuntu Releases website using Vanilla Framework