What each commit holds
Every commit is a tiny package containing:
- A unique hash (a SHA-1 code)
- The author's name and email
- The date and time
- The message
- The parent commit's hash
The hash is computed from all of that, so it can never change without rewriting the commit. That is what makes a hash a trustworthy fingerprint.
Flags that make it readable
| Flag | Does |
|---|---|
--oneline | One line per commit |
--stat | Files changed in each commit |
--graph | Draw the branch structure |
--all | Show commits on every branch |
Stack flags together. git log --oneline --graph --stat gives you the full story in a compact form.