by Brian Tanaka

Learn Git in an Hour with PeepCode’s Git Screencast

News
Apr 2, 20084 mins

Linus Torvalds developed the Git version control system to manage the Linux kernel project, but it’s useful in a wide array of projects, large and small. PeepCode’s Git screencast helps you get started with Git and leverage its power.

I like screencasts. A well-made screencast can explain complex concepts more effectively than a written document. Watching a screencast about a topic you’re trying to learn is like having a friendly expert by your side, showing you what you need to know. Recently, I stumbled upon PeepCode’s screencast about Git.

Buzz about the Git version control system is growing. Most famously, Git is used to manage the Linux kernel project, but Git is also growing in popularity as the preferred tool for managing all sorts of projects, ranging from software source code to websites to wikis and beyond. The Git website itself, for example, is managed with Git. And a git-backed ikiwiki can even function as a lightweight bug tracking system.

If you want to learn Git, you will find this screencast helpful and informative. It’s best for people who are new to Git but have Unix experience and a working knowledge of version control concepts such as branching and merging. Personally, by the time I was done watching it, I had picked up quite a few handy Git tips I could use right away.

Junio Hamano, Git’s maintainer, served as technical editor on the screencast, so you can rest assured the information is accurate.

The video’s example project is in Ruby on Mac OS X using the TextMate editor, so if you’re a Rubyist on Mac OS X who prefers TextMate, you’ll feel right at home. Naturally, though, the examples are easily generalized to any content in any editor on any flavor of Unix or Unix-like operating systems including, of course, Linux. Someone working in Perl on Slackware with vi will find it just as easy to follow along.

The screencast’s author and narrator, Geoffrey Grosenbach, guides the viewer through a series of topics, beginning with a brief history of Git and why it’s useful: it can be used offline (think: on a laptop while flying in a plane at 30,000 feet), it can be used with distributed or centralized projects, it supports easy branching, and it’s “clean” in the sense that there’s a single .git directory in the root of the project rather than multiple dot directories scattered throughout the project tree.

Next in the screencast, Grosenbach shows how to install Git via two methods: MacPorts and building from source. He also discusses using Git to get Git. On Linux, check your distribution’s package manager—you can probably get Git with a simple apt or yum command.

Now that Git is installed, we learn how to configure it by using git config to: set user.name and user.email, define Git aliases, and ignore differences in whitespace with apply.whitespace nowarn.

With installation and configuration out of the way, Grosenbach guides the viewer through example tasks using fundamental Git commands such as: git init, git add, git commit, git ls-files, git status, and git log. He shows you how to use the .gitignore file to tell Git which files to leave out of the repository, and he explains the concept of Git working with content rather than files.

Next, the screencast dives into a detailed example of branching. Grosenbach uses the gitk visualization tool to demonstrate and show a graphic view of branching actions, such as: creating branches, switching between branches, merging, resolving conflicts, and using rebase.

Grosenbach goes on to discuss and demonstrate working with remote repositories. He explores server set up, scp, cloning, pushing local commits to the remote repository, pulling changes to the local respository, and working with more than two repositories.

The final portion of the screencast discusses git-svn. This tool enables you to use Git locally and synchronize with a remote Subversion repository. This is handy if you want to use all the great features of Git, but your project is managed centrally in Subversion.

This screencast reinforces my fondness for screencasts, and I recommend it to anyone who wants to get started with Git. Grosenbach explains and demonstrates the Git fundamentals clearly, and he points out ways to streamline one’s workflow in Git. The production values of the video are fine, and it’s chapterized properly, which allows the viewer to jump to specific topics via the video player’s popup menu of chapters.

PeepCode’s Git Screencast costs US$9.00, is 60 minutes long, and can be downloaded from https://peepcode.com/products/git.