Understanding Git
Behind the Command Line
- Level
- Beginner
- Length
- 1 day
- Format
- On site or online
- For
- Developers new to Git
Git has become the de facto version control system of our industry, and for good reason. But for all its power and flexibility, Git has a terrible flaw: its complexity. A myriad of awkwardly named commands and options have earned it the reputation of being hard — and unnecessarily so — both to learn and to use.
I don't believe Git is hard to understand, though. Git is surprisingly simple at its core. If you don't believe me, type man git and read the very first line:
git — the stupid content tracker
Git is nothing more than a simple, yet very efficient, content tracker for your files. The key to its power is to understand it at a fundamental level — and the best way to do that is to actually see what's going on behind all those cryptic commands. That's exactly what this workshop is about.
What you will learn
Git from the inside out: you'll understand how the commands work by watching a real-time visual representation of Git's internal object model. Each time you create a branch, merge or rebase, you'll see how it affects your history. Once you have that mental model, the magic disappears and you'll make Git work for you instead of the other way around.
Topics
- The Git Parable
- Git's object model
- Anatomy of a commit
- Customising the way you view history
- What the index is and what it's good for
- Branching, a visual explanation
- Rebasing, a visual explanation
- Different kinds of branches
- Different ways of merging
- Branches vs. tags
- Resolving conflicts
- Choosing a Git client that works for you
Audience
Developers with little to no experience with Git. The only prerequisite is some familiarity with a command-line shell; I'll show you how to work with Git from either PowerShell or Bash. You don't have to keep using the command line afterwards — it's a learning tool to understand how Git works. Once you master the concepts, pick any Git client you like.