Your First Commit
A commit is a snapshot of your project at one moment, plus a note about what changed. Git history is nothing more than a chain of these snapshots.
Each commit points back at the one before it โ its parent. That backward chain is what lets git reconstruct any past state of your project.
The very first commit is the only one with no parent, because there is nothing before it.
Exercises
- Exercise 1. This repository is empty. Make the first commit to start its history.
- Exercise 2. One commit is not much of a history. Add two more, and watch each one attach to the one before it.