Skip to content

Git

A comprehensive course on Git - from your first commit through the internals of the object model, collaboration workflows across platforms, and advanced operations at scale. These guides take you from "I know I should use version control" to understanding Git deeply enough to debug, optimize, and architect workflows around it.

Each guide is self-contained, but the order below follows a natural learning path.


Guides

Foundations

1 Start Here
Introduction: Why Git, and Why Version Control
Beginner 30 min

The history of version control from RCS through SVN to distributed systems, and why Linus Torvalds built Git for the Linux kernel.

2
The Three Trees: Working Directory, Index, and Repository
Beginner 35 min

Git's core mental model - the working tree, staging area, and committed history. Covers the file lifecycle, .gitignore syntax, and the .git directory.

3
Commits and History
Beginner 40 min

What a commit actually stores and how to explore history. Covers commit anatomy, effective messages, git log formatting, and git diff.

4
Branches and Merging
Intermediate 40 min

Branches as movable pointers, not copies. Covers fast-forward vs three-way merges, conflict resolution, and git switch vs git checkout.

Core Workflows

5
Remote Repositories
Intermediate 35 min

Working with code that lives somewhere else. Covers clone, fetch vs pull, push, tracking branches, and SSH vs HTTPS authentication.

6
Rewriting History
Intermediate 40 min

When and how to clean up commit history. Covers amend, interactive rebase, cherry-pick, revert vs reset, and the reflog as a safety net.

7
Stashing and the Worktree
Intermediate 30 min

Interrupting work without losing it. Covers git stash, multiple working trees with git worktree, and git clean.

8
Configuring Git
Intermediate 35 min

Making Git work the way you want. Covers configuration levels, aliases, diff/merge tools, conditional includes, and .gitattributes.

Git Internals

9
The Object Model
Advanced 45 min

Git as a content-addressable filesystem. Covers blobs, trees, commits, annotated tags, SHA-1 hashing, and building commits with plumbing commands.

10
Refs, the Reflog, and the DAG
Advanced 40 min

How Git names things and connects them. Covers references, symbolic refs, the directed acyclic graph, garbage collection, and packfiles.

11
Transfer Protocols and Plumbing
Advanced 40 min

How fetch and push work at the protocol level. Covers SSH, smart HTTP, pack negotiation, shallow clones, and git bundle.

Platform Collaboration

12
Collaboration Workflows
Intermediate 35 min

Choosing how your team works with Git. Covers centralized, feature branch, Gitflow, trunk-based, and forking workflows.

13
GitHub, GitLab, and Bitbucket
Intermediate 35 min

Platform-specific features and tooling. Covers PRs vs MRs, CI/CD configuration, CLIs, code owners, and platform migration.

Advanced Operations

14
Git Hooks and Automation
Advanced 40 min

Automating quality checks and workflows. Covers every hook type, hook frameworks, git bisect, git blame, and smudge/clean filters.

15
Git Security
Advanced 35 min

Signing, credentials, and secret management. Covers GPG and SSH signing, credential helpers, secret scanning, and git filter-repo.

16
Monorepos and Scaling Git
Advanced 40 min

Git at enterprise scale. Covers sparse checkout, partial clones, commit graphs, Scalar, submodules vs subtrees, and build system integration.

17
Troubleshooting and Recovery
Advanced 40 min

The recovery playbook. Covers reflog recovery, undoing common mistakes, Git LFS, performance diagnosis, and repository corruption repair.

Comments