Git Architecture, Staging Area & Atomic Commits
Initialize Git repositories, understand Working Tree vs Staging Index vs Commit HEAD, and write atomic commit messages.
Learning Objectives & The Three States of Git
### Learning Objectives
- Differentiate between Centralized (SVN) and Distributed (Git) Version Control Systems.
- Navigate the three states of Git: Working Tree, Staging Index, and Commit HEAD.
- Inspect project history and file diffs using `git log` and `git diff`.
- Write atomic Conventional Commit messages (`feat:`, `fix:`, `docs:`).
---
### The Three Local States of Git
Git tracks files through three local areas:
1. **Working Directory**: Modified files on disk not yet staged.
2. **Staging Area (Index)**: Proposed commit snapshot formatted via `git add`.
3. **Local Repository (`.git` directory)**: Permanent immutable snapshot commits stored as directed acyclic graph (DAG) objects.