Best new thing in my world today: Git

Git is version control software, sort of like “track changes” for an entire directory structure. But it has powers and abilities far beyond those of ordinary version control tools. Among other things it can move files — securely — between servers anywhere you have access to install it.

Why did I bother to learn Git?

My motivation was both intrinsic and extrinsic: I have experienced the deep feeling of chagrin that comes from knowing you’ve just overwritten hours of good work with an older version of a file. I already wanted to learn how to use Git because I had seen interesting projects on GitHub that I thought I might even be able to contribute to. The extrinsic motivation, and the reason I stopped procrastinating, is I now have to use it at work.

Did I have a strategy?

Having a project of my own allowed me to put many more hours into learning Git, and to use it for things I wouldn’t try at work for many weeks. At work I’m literally only expected to contribute to two files — one is CSS the other JavaScript. For my project I’m carrying around a laptop, but my biggest screen (and most comfortable coding chair) are at the desktop in my music-room. The desktop has 3 or 4 different web servers running on it, which I can access from anywhere on my home network. My learning strategy then was to set up as if I’m a team of people working from different computers on a network. I ended up setting up two repositories on each computer. I used a variety of Internet resources whenever I faced an impasse. I soon found several well-written sources that helped me.

What did I already know that helped me learn Git?

Almost immediately as I started working with Git I thanked the fact that I’ve installed and worked with various Linux flavors — Fedora and Ubuntu mainly, but others as well. Git runs on Windows in a Linux “shell” and you need to know about case-sensitivity and forward slashes. The most frightening and potentially alienating thing for any Windows user is probably Vim, the 20-year old text editor (and so much more) that Linux geeks will never abandon or bury. When you commit changes using commit -a a Vim terminal appears. When you start typing in Vim all hell breaks loose until you learn to press Insert up front, and you won’t get out with anything you type intact until you learn the sequence ESC : w q . I was lucky I went through that frustration a couple years earlier.

What surprised me about learning Git, or what did I learn that I didn’t expect to learn?

At one point I had to open a utility, Gitk, that comes with Git. Looking at the long list of commit messages I generated as the project evolved I realized I had inadvertently collected a log of my thought processes. If I were teaching something in a classroom and I could have my students keep a similar log while working on their projects I’d know what they were thinking at various stages, and perhaps gain all sorts of otherwise unexposed insights into both their learning and my teaching. I mentioned this thought to the IT program manager at work. His comment was he would love it if they taught Git in high school.

I’ll probably post more about working with Git. But don’t wait for me… get Git and all the documentation and tutorials you’ll probably ever need at git-scm.com/.

Leave a Reply

Your email address will not be published.