Good bye bzr, welcome git

I like version control systems and have been using them for a long time. I’ve
spent much time in [CVS][CVS] and even used [RCS][RCS] toquickly bring
directories under version control. I’ve also performed duties as a version
control and release manager using CVS. That time has exposed me to many
pain points with CVS (directories are not versioned, you can’t rename
files without tricky stuff, merges arrive on the “pain train”, etc) and so
I was looking for something new and better for my personal projects.

At work we are using [SVN][SVN] and it certainly has come a long way from
CVS and I think managed to largely live up to it’s former slogan of “CVS
done right”. It seems to work rather well for me at work, although Linux
Torvalds might disagree as you can hear in his [Tech Talk: Linus Torvalds on

Around the same time [distributed version control systems][DVCS]
started popping up. Three of them stood out as most prominent: [GIT][GIT],
[Bazaar][BZR], and [Mercurial][HG]. Those systems differ from their older
bretheren primarily by focusing on distributed development rather then a single
code repository. That seemed odd at first, but makes sense when you think about
open source development, with possibly lots of people contributing from around
the globe.

To make a long story short, I went with Bazaar. My primary reason for this were few:

* the commands felt more like what I was used to
* the structure of the repository felt more like what I was used to
* there was a GUI that among other things showed branches nice (yeah, I know.
Those who know are saying “I thought you lived in the shell!!!” … yes,
I do, but to visualize branches etc a GUI makes more sense and I don’t often
use it)

So, I was on my merry way using Bazaar for my personal projects. I was well
aware of the fact that GIT was far faster, but then again when you are
working on small personal things a bit of slowness doesn’t really manifest
itself and the maintainers managed to address most of those issues bringing
Bazaar speed much closer to GIT.

So a few days ago I was working on some code and after adopting a [feature
branch model][fbm] approach at work. I decided to do this in my projects as well.
None of them had branches at the time and clutzed around a bit to kinda get it
to work. It didn’t feel right and in my journey’s through google land I found
some interesting reads. One of them was some push to move [Emacs][EMACS] from
Bazaar to GIT. The primary focus was on the fact that bugs didn’t seem to get
fixed in Bazaar and the [thread][ETHR] makes some other interesting comments.
From there I found a post called [bzr – a retrospective][bar] by one of the
maintainers about Bazaar and it seemed to confirm that there was no effort
going into it. I also came across a page called [Popularity contest statistics
for git,mercurial,bzr,subversion][pop], which suggests that Bazaar is very niché.

So, I decided to move to GIT for a couple of reasons:

1) I’d like to know that the tool keeps running. GIT is actively maintained while Bazaar is not
2) GIT seems to have a great following and likely feels more useful to learn for practicality
3) GIT can maintain the branch states full if you commit with –no-ff

So I set out to migrate my existing stuff to GIT. The process was pretty
[How-To: Convert from bzr to git on Debian/Ubuntu straight forward and is well
described in][htcbg]. In a nutshell I did the following:

mkdir project.git
cd project.git
git init
bzr fast-export –export-marks=../marks.bzr –git-branch=master ../project.bzr/trunk | git fast-import –export-marks=../marks.git
bzr fast-export –export-marks=../marks.bzr –git-branch=branch-1 ../project.bzr/branch-1 | git fast-import –export-marks=../marks.git

And that was about it. There are a things that are different in GIT. For
example you change from one branch to another by running

git checkout

and to go back to master just run

git checkout master

That changes the files in the project directory, rather than having a tree
hierarchy with *trunk/*, *branches/* etc. It feels pretty nice once you get
used to it. Just make sure you don’t change branches without committing first,
since GIT will merge stuff for you as described in [switching branches without

There are also nice bits to GIT I wasn’t aware of, such as the
[instaweb][instaweb], which allows you to fire up a browser based repository
browser. If you are a [Vim][VIM] useryou might want to look at [Using Git from
Vim][UGFV]. I’ve long use the [VCSCommand][VCSC], which also works with GIT,
but [vim-fugitive][v-f] is very powerful and even lets you fire up the aforementioned instaweb feature right from inside Vim!

There are also a couple of GUIs available. Again those are useful to me
primarily for viewing the branch histories. You can find them and lots of other
GIT related tools listed at [Interfaces, frontends, and tools][git-tools].

The [GIT documentation][git-doc], is pretty good and there even is a free book.
So far, so good. Well, here’s to a brave new world.




Leave a Reply

Your email address will not be published. Required fields are marked *