Git for SBCL Hackers
Friday, January 18, 2008
A number of SBCL hackers have been using the Git SCM utility. Now, SBCL isn't "officially" maintained with Git (SBCL's "home" repository is in CVS); however, there are a lot of reasons why developers prefer Git. The GNOME developers (for example) were in a similar situation to the SBCL developers and the following lists some of the reasons why GNOME developers found Git compelling:
- Offline operation. You can commit, create branches, merge branches, etc., without having to be online. This is a huge benefit for hackers with laptops.
- Fast! Since git operates locally unless instructed to go to the network, operations are very fast. Most operations take less than 10 seconds, even for huge projects like the Mozilla tree.
- Distributed. There is no central point of control (except if you use Git to mirror SVN/CVS, of course), and all the cool kids are doing it anyway.
- Merging branches is very pleasant. CVS and SVN always made this hard.
- Repository size. A git-svn repository with dozens of branches still "weights" like the original SVN checkout (if not slightly less).
- Full history. When you clone a repository you have the entire history available, so you can roll back, diff or check out to any point in time without ever hitting the original repository.
- Fully scriptable. Many of the commands available are scripts or combinations of basic commands. You are encouraged in creating scripts and aliases to ease your workflow, once you find out that you're repeating certain sets of operations.
- Andreas Fuchs' Git repository: git://sbcl.boinkor.net/sbcl.git
- Nikodemus Siivola's Git repository: git://repo.or.cz/sbcl.git
git-cvsexportcommit) a patch that
is applied to the CVS version of SBCL and the changes are propagated
back to the Git repositories when the next hourly refresh of the
public Git repositories is done. So, they get some of the benefits listed
above even though they must commit their changes to CVS in order
to push them into the main SBCL development tree.Nikodemus Siivola has written an excellent Git for SBCL Hackers document (it's actually included in the "doc" directory of the SBCL install; however, I've included a link to the CVS version of the document so that you can read it online without having a copy of the SBCL source on your machine). For anyone interested in hacking SBCL and wanting to use Git, that document is a great resource. Some other posts that talk about using Git with SBCL are: Some resources that I've found useful for learning/understanding Git are:
- Intro to Distributed Version Control (Illustrated): An excellent (and easy to understand) introduction to distributed version control systems, how they work, and their benefits.
- Git for Computer Scientists: Another overview (this one is Git-specific).
- Everyday GIT With 20 Commands Or So: This is an excellent introduction to using Git. Since most people won't need to use most of Git's functionality on a regular basis, it provides typical "day in the life" scenarios for different roles: Individual Developer (Standalone), Individual Developer (Participant), Integrator, and Repository Administration.
- Git for GNOME developers: GNOME developers were in a similar situation to SBCL developers - GNOME was maintained in SVN but many developers wanted to us Git instead. This page provides a high-level overview of how to use Git locally but with updates going to the central SVN repository. It includes links (see here and here) to one developer's description of his typical Git workflow.
- Movie of Linus Torvalds' talk on Git at Google: Very entertaining introduction to Git (Linus doesn't mince words when he talks about other SCM packages; so, if you like some other SCM software, be prepared to be offended! ;-) ).
- Version Control Systems and Innovation: Discussion of some of the "social reasons" for using a distributed version control system and how using a "centralized" version control system (such as CVS) can negatively impact innovation.

