We’ve just hosted our freshly minted two-day Git course in Canberra, Australia (which was a major overhaul of a one-day Git course we’re run several times). I’ve learned so much from running these courses - and I thought I’d jot down a few things we’ve discovered teaching git that might be helpful when you’re working with colleagues and other git students.
Insight #1 - It’s all about the DAG
It’s understandable that most Git training centres you on the PC doing git commands. But we’ve found that’s been inefficient for us. Using Git productively relies on your have a solid mental model of how it works - and with Git, how it works is all about Directed Acyclic Graphs (DAGs).
The Think Like A Git site takes this DAG-centric way of teaching, and we’ve adopted that pretty hard. We even adapted one of their teaching tools, The Seven Bridges of Königsberg, as a group activity. This is a great tool for helping people get the idea that there are only “Places to go, and ways to get there”. If you nail that idea, a lot of the hard work is done.
Once they have a little bit of an idea about Git as a directed graph, it’s still not time to get near a PC.
Insight #2 - Going Tactile: The Computer is not always your friend
We’ve found that PCs can actually create clutter in understanding what is happening in the early stages.
I’ve been spending a lot of time with Sharon Bowman’s book Training from the Back of the room (if you develop courseware, or give training, just go buy it. It’s gold). I’ve learned a lot about getting creative with training exercises, and about doing a lot less talking, so for this course, before we do any Git exercise on the PC, we do it on Index cards. Together. As a team.
If you look at the picture below.. Yes, that’s moving commits from the working directory, through staging, and into the repo.
We do that one step at a time. They even have to play command cards like “git add”, “git commit”, etc. They also have to create their own files on white cards (interesting to see the mix of file extensions between the systems guys and the dev guys), and commits (with SHAs) on yellow cards.
And they lay down their commits. With index cards.
All before they ever hit a PC :-)
This turned out to be tremendously helpful for a lot of people. If you’re a visual learned, or a kinaesthetic/ tactile learner, this stuff is water to your soul.
We used this technique to great effect when teaching all aspects of the course. On day 2, when we started working with remotes, we required two tables, but that’s for another post!
Feels good to be back on the blogging horse, and I have a backlog of these takeaways I’m going to be presenting over the next few weeks (if only so I can refer to them later!).
Happy DAGing!