This June is one year since I decided I was sick of code editors like WingIDE,
Eclipse, PHPIDE, and Komodo. A year ago this month, I went to vim, and I haven't
looked back.
This has worked out so well I've taken up other tools I never thought I'd really
be using. Things like the Awesome tiling window manager, urxvt, and zsh have
been changing how I work all the time.
Along those lines, I've started to use a DVCS I had said I'd fight to avoid,
git. I had started out using Mercurial (Hg), and once getting started in projects
on Launchpad, I moved to Bazaar for my own needs. Why do I need another tool.
How many different version control systems can a person really use?
Well, I've done it. I'm a git user, most of my personal stuff is moved over and
I've been using git-svn to do all of my work code management for a month now. I
promised Jorge I'd do a blog post as to why I've gone this route and here we go.
First, the disclaimers. I don't do a lot of work with groups of people and tons
of changesets. So I could be completely skewed. Next, I'm a web developer. My
needs have a few gotchas that might not apply to everyone. Finally, as I've
noted, I lean toward certain tools I find that make me more effecient, at the
cost of ease of use. Vim > *
Why I'm loving git take one: named branches means one directory to rule them all
I LOVE the way in git you have a single directory for your project. You create
branches within that and whenever you switch from one branch to another, the
files in the directory are updated to reflect the state of that branch. The
biggest reason this rules for me is that, as a web developer, I have virtual
hosts setup to my various projects on a local web server. This is where my dev
work takes place. When I used bzr, I had a directory for each branch and this
caused me to have to maintain new virtualhosts for each of these. That
management sucked and caused me to avoid new branches sometimes. Git's method
makes it so low cost to create tons of small branches and keep working.
Take two: It's the command line stupid
I love the command line and the best thing git has going for it, is the command
line usage. In Bzr I had a vimdiff plugin to view diffs in vimdiff. In git I
just specify my diff program, from meld to vimdiff. The colored output is
awesome, all of the commands are very verbose and provide great guidance and
information along the way, and the log output via the terminal is just great and
tweakable.
Take three: I just like the way it works
Hg and bzr are very similar. They are made to be very friendly to converting svn
users and I liked that a lot as I got started in distributed version control.
Git does several things differently. I like how it does storage differently, I
love the build in things like stash and such (I know there are shelve plugins
for bzr) and I like the staging area.
Finally: speed, hardy, and git-svn...make it complete
Work uses svn for our code and in order to get my cool branches I need a svn gateway. I tried bzr-svn and it worked great at first. Then the updates came and things blew up. Trying to get bzr and svn to play nice seemed to cause headaches and I ended up with a project I couldn't commit to because of broken plugins. Git-svn has worked flawlessly for me and when combined with the way branching works is much nicer for my workflows.
Speed matters a little bit too. It's not the reason I started using it, but it's
very handy. I know bzr is greatly improved, but it's at a lot of complication. I
honestly can't keep up with what type of checkout with what type of storage
backend I'm supposed to use in order to increase speed of operations. I applaud
bzr for the work on always improving, but it causes a lot of headaches.
Finally, my colo server is still running Hardy (hate mail can be sent to ...)
and git is available on it. The PPA in launchpad goes back to hardy and it's
great that I can sync things off to my colo server. Again, a small touch, but
one that helps for me.