Concepts
Concepts
Understand Git's core concepts including the three-layer model, history model, .gitignore, detached HEAD, and more.
Concepts
Start Here First
Start with the three-layer model, history, and detached HEAD before diving deeper.
Git History Explained
Explains how Git records history, why commit history is a graph, and what that means for collaboration, recovery, and code review.
02Git's Three-Layer Model: Working Tree, Index, and Objects
Explain Git's core three-layer architecture — Working Tree, Index (Staging Area), and Objects Database — and how they work together.
03The Complete Guide to .gitignore
A comprehensive explanation of .gitignore rule syntax, precedence, glob patterns, global configuration, and how to exclude files that should not be committed.
04Understanding .gitattributes
A deep dive into .gitattributes for controlling line endings, merge strategies, diff drivers, and binary file handling in Git.
Concepts
Key Concepts
To build a solid Git mental model, start with the three-layer model, Git history, and detached HEAD.
Git's Three-Layer Model: Working Tree, Index, and Objects
Explain Git's core three-layer architecture — Working Tree, Index (Staging Area), and Objects Database — and how they work together.
Git History Explained
Explains how Git records history, why commit history is a graph, and what that means for collaboration, recovery, and code review.
Understanding Detached HEAD State
Explain what detached HEAD is, how you enter this state, and how to safely exit detached HEAD while preserving your work.
Concepts
All Concepts
Break down Git's core concepts into focused standalone topics for a solid foundation.
Git's Three-Layer Model: Working Tree, Index, and Objects
Explain Git's core three-layer architecture — Working Tree, Index (Staging Area), and Objects Database — and how they work together.
Git History Explained
Explains how Git records history, why commit history is a graph, and what that means for collaboration, recovery, and code review.
The Complete Guide to .gitignore
A comprehensive explanation of .gitignore rule syntax, precedence, glob patterns, global configuration, and how to exclude files that should not be committed.
Understanding .gitattributes
A deep dive into .gitattributes for controlling line endings, merge strategies, diff drivers, and binary file handling in Git.
Git Hooks: Automating Git Workflows
A practical guide to Git hooks, covering client-side and server-side hooks, common use cases, and best practices for hook management.
Git Subtree: Managing Nested Repositories
A practical comparison of git subtree vs git submodule, and how to use subtree for embedding and synchronizing external projects.
Managing Large Files with Git LFS
A complete guide to Git Large File Storage — installation, tracking large files, migration, and team workflow considerations.
Shallow Clones and CI Optimization
Understanding shallow clones, single-branch clones, and how to optimize Git operations for CI/CD and large repositories.
Understanding Detached HEAD State
Explain what detached HEAD is, how you enter this state, and how to safely exit detached HEAD while preserving your work.
Git Merge Strategies Explained
A systematic introduction to Git merge strategies — recursive, ort, octopus, ours, subtree — what problems they solve and how to choose.
Git Worktree: Parallel Working Directories
A systematic explanation of Git worktree — how to check out multiple branches into different directories simultaneously, the problems it solves, and when to use it.
Git Stash: Temporary Work Context Storage
A systematic explanation of git stash — what it is, when to use it, its limitations, and how to safely manage temporary work context.