Git Success Stories and Tips from Tor Chief Architect Nick Mathewson

Tor, the free and open source software for anonymous web communications, has been using the Git revision control system for more than six years. The tool is so ingrained in the project's development that Director and Chief Architect Nick Mathewson's daily work flow is built around Git, he says.

“Git's the eighth version control system I've had to use, and the first one I've seriously trusted,” Mathewson said. “Many thanks to the Git developers for all their hard work.”

In celebration of Git's 10-year anniversary this week, Mathewson shared why the Tor Project uses Git, their Git success stories, and his pro tips for using the tool. For more in our “Git Week” series, see our interviews, below, with Git creator Linus Torvalds, and project maintainers from KVM, Qt, and Drupal, with more to come tomorrow.

Linux.com: Why does Tor use Git?

Nick Mathewson: We switched to Git from SVN in 2009 because we wanted offline development, distributed development, and merging to work. We need to manage a few stable and unstable releases simultaneously, and we frequently apply feature patches that require multiple revisions and long, complex branches. For both of these cases, having robust support for merging was valuable.

We picked Git over the other options because it seemed to be gaining the most mindshare among developers. That still seems to be the case.

What makes Git such a great tool?

It's obviously designed by programmers who made it to use it themselves, and who understand that even in the sleekest version control system, you often need to get under the hood and access raw internals.

Any git success stories you can share?

A little while ago, I needed to decide what parts of Tor we should prioritize testing on. I guessed that functions which change frequently over time, and which get changed by many people, are likelier to have bugs than ones which didn't. So I wrote a little python script to parse git blame and git log -p output, and had a full analysis of our change frequency by function since 2002.

On a more prosaic note, my sister lives out in the woods and has no reliable internet connection. Git enables me to get work done when I'm visiting here, which was nigh-impossible back before we had offline operation.

Anything else you'd like to say to mark the 10-year anniversary?

Git's the eighth version control system I've had to use, and the first one I've seriously trusted. Many thanks to the Git developers for all their hard work.