Introducing Git + Github

From Excuse me, do you have a moment to talk about version control?

From “Excuse me, do you have a moment to talk about version control?”

Recently, I ran a Git + Github workshop for my research group here at Ohio State. You can find the materials here, which I used along with a live demonstration.

Something helpful that came out of this exercise was that it really made me sit down and think about how exactly version control is useful to applied economists and how it can be made to feel as accessible as possible.

Here are some principles I settled on. These were heavily influenced by Jenny Bryan’s excellent article, Excuse me, do you have a moment to talk about version control? and David Robinson’s approach to teaching the tidyverse suite of packages. The RStudio community was also super helpful in suggesting resources and teaching tips.

If you haven’t read David’s blog posts, my takeaway from them is that the earlier you can get students to the payoff, the better. Here’s a key quote from his ggplot2 post:

Why does it matter how the plot looks? Because you’re not just teaching students how to program in R, you’re teaching them that they should. Learning to program takes effort and investment, and the more compelling the figures you can create very early in the course, the more easily you can convince them it is worth the effort.

Here’s how I translated David’s principles into the Git + Github context.

Emphasize project management as much as version control

Broadly speaking, there are two reasons the Git/Github workflow is useful.

  1. Version control makes it easy to track and reconcile changes made by multiple collaborators
  2. Github repos are a pleasant interface for managing a project - e.g. rendering of Markdown documents, using Issues for task management

Most guides to version control that I’ve seen tend to emphasize version control much more than the handiness of the Github interface, so I tried to shift the emphasis just a little bit more in the other direction. My sense is that for applied economists, solo work is still common enough that the benefits of version control are not immediately obvious. Even teams of 2-3 people can still find reasonably effective ad-hoc alternatives, especially if they are working on sufficiently distinct portions of the project.

On the other hand, I find the usefulness of the Github interface much easier to explain because it is visual. Explaining how to navigate a web page is a lot easier than trying to explain how to make a commit or a branch, and a beautifully rendered Markdown document speaks for itself. In that sense, the payoffs are more immediate.

Sticky GUI fudge

Best kind of GUI

Best kind of GUI

Another thing I tried to emphasize is the usefulness of Git clients (specifically, GitKraken). This is a point that’s been made by Jenny Bryan.

Firstly, the visual representation of commits and branches makes the logic of version control a lot more intuitive. Secondly, many people just don’t work from the command line that much and it might be unnecessarily intimidating. In fact, I’d go so far as to say that the GitKraken interface makes version control look…fun???

Wheeee! Time to get crackin’

Wheeee! Time to get crackin’


I was lucky to find out about version control relatively early on, which gave me time to experiment with it and figure out how it could be useful to me, but it’s easy to see how the Git + Github workflow can seem like more work than it’s worth to a newcomer. I’d be interested to know how others have introduced Git + Github in fields where it’s not used universally. Shoot me an email/tweet!