Course info
Mar 10, 2016
1h 49m

Here is a confession: I used Git for a long time without really understanding what was going on. I knew all the basic commands, but I still got stranded when something went wrong. Why did my rebase fail? How did I manage to mess up the remote? Then I found the key to Git: the content of the .git directory. Once I understood the underlying model, everything about Git clicked into place. Things that used to be baffling and complicated suddenly looked simple and elegant. Let me share these insights with you. It will take you just two hours to wrap your head around Git.

About the author
About the author

Paolo Perrotta is a traveling coach and a software mentor. He wrote "Metaprogramming Ruby", widely praised as one of the essential books on Ruby.

More from the author
Design Patterns Playbook: Structural Patterns
1h 5m
Dec 13, 2017
Mastering Git
2h 42m
Oct 13, 2016
Section Introduction Transcripts
Section Introduction Transcripts

Branches Demystified
Welcome to How Git Works, Module 2. This is where things really get interesting. In the previous module, we laid the groundwork. Now let's make that information concretely useful. In Module 1, we said that Git is a stupid content tracker. We had this method for an onion, now we can move on to the next layer of the Git onion, and look at the features that turn Git into a full-fledged revision control system, features like branches and merges. I'm assuming that you already have a basic idea of what a branch is. Maybe you even use Git branches every day. But after this module, you might end up looking at them in a different light.

Rebasing Made Simple
Welcome to How Git Works, Module 3. Git is an onion, remember, and we're still looking at the versioning layer of the onion, the features that turn Git into a full-fledged version control system. In the previous module, we talked about branching and merging. Now, let's look at a couple more features that are also related to versioning, and in particular at a very important one, rebasing. Branching and merging are standard features for any revision control system, but rebasing is way less common. Only a handful of version control systems have it, and Git is by far the most popular of them. In a way, rebasing can be seen as Git's signature feature. Let's see how it works.

Distributed Version Control
Hello and welcome to How Git Works, Module 4. We are only missing one last layer in our description of the Git onion, but it's a really important one, distribution. So far we imagined that there was only one computer in the world, the computer that you're running Git on. Now, let's see what happens if you use Git the way it's used in practice, to share a project across multiple computers.