beginnerGit Fundamentals
Commit Hash
The Definition
Every commit has a unique identifier called a hash (SHA-1), which is generated based on the commit's content.
Mental Model
"A commit hash is like a fingerprint. It uniquely identifies each commit and ensures the integrity of your repository history."
Visual Simulation
Live Engine
A
B
C
7af2...de91
Watch Out (Common Pitfalls)
!
Trying to memorize or manually type long commit hashes
!
Not understanding that changing any part of a commit changes its hash
!
Assuming commits are mutable - they're not!
Hands-on Command
shell
~ $
git log (to see commit hashes like a1b2c3d...)