Git · Junior · Question 5 of 75
What identifies a commit in Git?
- 1A number that grows with every commit
- ✓Correct answer: A hash of its content and metadata
- 3The date and time it was created
Explanation
A commit's ID is a SHA-1 (or SHA-256) hash of its tree, parents, author and message. Change anything and the hash changes, which is why rewriting history creates new commits.