I went looking for the update to Tom Preston-Werner’s talk on Git that I wrote about previously but I didn’t find it. What I did find, however, is another talk on Git, entitled Unlocking the Secrets of Git that he gave at the UCAR Software Engineering Assembly. This was a very enlightening talk that along with his Git Parable provides an excellent understanding of the Git architecture and how it works under the covers. He describes Git as a user-land file system with versioning and synchronization.
In this talk he constructs two Git file blobs by hand (using an editor and an interactive Ruby shell) and shows how they get named by their Sha1 hashes. Then he constructs a Git tree object—essentially a directory listing of the two file blobs—and then uses git cat-file
to show its structure. Finally, he makes a commit object and again shows what it looks like with git cat-file
.
This talk really brings alive how simple Git is. There’s something about seeing the objects made by hand (not even using Git in the case of the file blobs) that dispels all the mystery. I really can’t recommend this talk enough if you’re a Git user. It will really help you understand what’s going on.
Of course, there’s a lot more to Git then the add, and commit commands so the talk won’t make you a Git master but it will give you the background to understand the more advanced commands and how they fit in with the Git way of doing things.
Preston-Werner is a Git master and a cofounder of GitHub so he’s a good teacher and give gives an entertaining talk. It’s about 75 minutes long so you’ll need to block out some time but it’s well worth an hour and a quarter of your attention.