I’ve been a longtime subversion user and before that Visual SourceSafe (ew gross), but at the new jobby job, it’s all git all the time. Being very used to the pretty awesome TortoiseSVN and ZigVersion gui clients for svn, I’ve been a bit hesitant to really dive into git, not really knowing what to expect out of the experience of using shell only tools, and in general understanding why git was designed, and what the big deal was vs. svn, cvs, and other traditional source control management tools. Now that I’ve spent some time making Terminal.app my bitch (fodder for another post I’m afraid), I realize (not fully yet of course) how awesome getting into git can be.
So here’s a quick list of why git rocks, or why I think it does anyhow, and why it’ll be my tool of choice, at work and at home for quite some time.
- When you initially start working on a project someone else has started, already in a repo somewhere, you need to clone it. This is approximate equivalent of svn checkout, pulling the project down to your machine. The really big deal though, is that you now have, on your machine, a complete copy of the repository, not just a checked out working directory, but a full repo! Yes! The entire history of the entire project, and every file in it on your little old machine. Because most work is done locally, git is fast.
- It’s pretty space efficient and smart about diffs. Check this quote ripped from the Peepcode PDF on git: “The Ruby on Rails Git repository download, which includes the full history of the project – every version of every file, weighs in at around 13M, which is not even twice the size of a single checkout of the project (~9M). The Subversion server repository for the same project is about 115M.”
- No muss no fuss. With svn, you end up littering your working directory with tons of .svn directories. With git, there’s just one .git directory in the root of your project.
- Rebasing interactively. Re-order, split, edit commits and then send them on their way. Sounds pretty odd right? Check out the interactive mode section over at the git doc page.
- Branching, for the win. If you’re used to svn, sourcesafe, cvs, or most other traditional systems, when you hear “branch”, you probably want to curl up into a little ball and die. Nightmares of manually resolving hundreds of conflicts, cats and dogs living together, fire and brimstone! Blah! First of all, git was designed to reduce these headaches so almost every bit of development you do ends up being done in your own little branch. You can freely commit to your own branches and switch back and forth between branches at your leisure (git checkout), pull everyone elses recent commits into master, while not at all disrupting your own branches. Files that have been modified but not committed to any particular branch will follow you around as you checkout different branches. This threw me off at first, but makes life so much easier.
I highly recommend that Peepcode PDF, and if you are looking for something a bit shorter, Git Magic by Ben Lynn is wonderful.
0 responses so far ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment