Learning Git: my favorite resources

Felipe Vogel - Jan 18 '23 - - Dev Community

When you're making a pull request, do you ever realize your Git branch has become a massive pile of disordered and unrelated changes, but then you don't do anything about it because you're afraid of making an even worse mess by fooling around with Git commands that you don't understand or even know how to undo?

Me? No, of course not…

Nervous laughter

Anyway, I've decided to improve my Git skills, and I thought I'd share my favorite learning resources that I found.

My favorite Git learning resources

These are excerpted from the new "Git" section of my "Learn Ruby" list. (Yeah I know, Git is not part of Ruby. It's just that I didn't want to create a separate list for general programming skills.) I keep the list up to date, so unless you're reading this in January 2023, you should check there in case I've found more Git resources.

I made the Git list by (1) scouring the Web for recommended resources, then (2) trying out each one to see if it would be worth going through to the end. In case you're curious about which resources didn't make the cut, here's the commit where they are removed.

(Just so you know, I'm proud of that commit. Originally I made separate commits to remove each unwanted resource, interspersed with other unrelated commits. But at the end I used my new Git skills to do an interactive rebase, squashing a bunch of commits into one and re-ordering the unrelated commits to an earlier point in the branch 😎)

Without further ado, here are my favorite Git learning resources so far. They're all free except for the last one.

Right now I'm working through Git Katas. After that, and before going through the intermediate/advanced Git resources, I might spend time on other fundamentals (see below).

Git-related VS Code extensions

Until recently I used the GitLens VS Code extension, but then I realized that its only features that I care about are either finnicky (popup-on-hover Git blame), needlessly complicated (browsing a file's history), or behind a paywall (graph visualizer).

So I replaced GitLens with these smaller extensions:

  • Git History Diff
  • Git Blame to quickly see the current line's blame in the status bar.
  • Git Graph for when your repo is complex enough that git log --oneline --graph is hard to decipher.

Reflections on the fundamentals

Besides the "Git" section, I've added three other sections under a "Fundamental tools" heading:

I'm really enjoying learning these fundamentals. I love Ruby, but it's nice to focus my learning on something else for a change—though I'm still watching Ruby screencasts whenever my wrists need a break.

In fact, I'm having so much fun that I'm tempted to expand the "Fundamental tools" section, but it's probably best to pick a few technologies and go deep into each, rather than throwing a bunch more stuff in there and making it less likely that I'll go deep into anything.

So, as a compromise, I have a separate "Expanding my horizons" section for those times in the future when I want to take a dive into something outside of Ruby or frontend skills.

As I write this, I'm reminded of a Thoughtbot blog post about "evergreen skills" (similar to what I've called "fundamental tools") which is worth a read.

I hope my explorations of Git and other fundamentals has been as rewarding for you as it has been for me. Happy learning!

. . . . . . . . . . . . . .