Git

Over the years, I've both written and spoken about Git in articles, presentations, workshops or by answering questions on Stack Overflow.

In more than one occasion, I've found myself wanting to link to one of those resources but not being able to find it. This page is an attempt to group everything together in a single place to make it easier to reference in the future. I hope you find it useful.


Articles

I made a rule for myself that every time I learn a new peculiar thing about Git, I write it down. Every once in a while, I'll come across something that really needs explaining, so I'll write an article about it. Here are the links to my Git notes so far.

What's in a Branch

Regardless of how you choose to track your history, one of the things you often want to know is which commits are in what branch. Sounds easy enough, right? And yet, you wouldn't believe just how cumbersome certain version control systems make answering such a simple question. What I think you'll find even harder to believe, however, is the fact that with Git it's as easy as pie. Continue reading ↦

Git Undo

Tell me if you recognize this scenario: you’re in the middle of rewriting your local commits when you suddenly realize that you have gone too far and, after one too many rebases, you are left with a history that looks nothing like the way you wanted. No? Well, I certainly do. It was in one of those moments of despair that I finally decided to set out to create my own git undo command. Here’s what I came up with and how I got there.
Continue reading ↦

The Importance of a Good-looking History

Since the dawn of civilization, common sense has taught us that the way forward starts by knowing how we got here in the first place. While this powerful principle applies to practically all aspects of life, it’s especially true when developing software. For us programmers, the rear mirror through which we look at the history of a code base before we go on to shape its future is version control. Among all the information captured by a version control tool, the most critical ones are the commit messages.
Continue reading ↦

Grokking Git by Seeing It

When I first started getting into Git a couple of years ago, one of the things I found most frustrating about the learning experience was the complete lack of guidance on how to interpret the myriad of commands and switches found in the documentation. What I was looking for, was a way to represent the state of a Git repository in some sort of graphical format. In my mind, if only I could have visualized how the different combinations of commands and switches impacted my repo, I would have had a much better shot at actually understand their meaning.
Continue reading ↦


Courses

Sometimes, I have more things to say than can fit in an article or a presentation. That's when I make a course instead. However, those take longer so there are fewer of them. In any case, rest assured that every time I publish a new one, you'll find a link for it here.

Advanced Git Tips and Tricks Pluralsight

If you've been using Git for a while, you probably know how to use it like any other version control system; you commit files, review changes, maybe even create and merge branches. That's how most people use it. But Git is unique in that it's more powerful and puts you in complete control of your source code history. This course will teach you how to use Git's advanced features to improve your daily workflow. By the end of this course, you'll have discovered just how much potential lies hidden behind the surface of git commit and git branch — potential that will serve you well every single day.


Presentations

A selection of some of my most popular presentations about Git from recent years. I linked to the slides and demo material as they were available. If a talk was recorded, I made sure to include a link to the video as well. For my other presentations, check out my speaking page.

The Things Git Can Do NDC Oslo 2016

In this talk, I demonstrate exactly what Git can do for you that none of the GUI tools ever tells you about. Moving chunks of commits between branches in a single command, custom history visualizations and data recovery are only some of the things I demonstrate, all 100% from the command line. If you're using Git through a GUI, you're missing out and in this talk I show you why.

Git Tips and Tricks WROC# 2016

In this talk, we'll learn to take advantage of Git's advanced — and therefore lesser known — features to take our daily workflow to the next level. Since staring at the command line alone can be daunting at times, we'll also be looking at a graphic representation of our Git repository. As we run different commands, we'll see immediately how they affect the underlying history. This will help us understand how they work at a fundamental level, making it easier to remember them and use them in the right situation.

Grokking Git by Seeing It Leetspeak 2012

In this talk, I teach you the Git zen from the inside out. Working out of real world scenarios, I walk you through Git’s core concepts and building blocks, building our way up to more advanced features. And I do it by showing you graphically what happens under the covers every time you fire a Git command. It’s my belief that this kind of deep understanding of Git’s inner workings is the key to unlock its true power: taking control of your history.