History
Cheat sheet · https://pcornel.dk/topic.php?topic=5477
Answer
Git history is the commit graph and associated metadata reachable from selected refs; views can differ depending on traversal, filtering and ref freshness.
Remember
- History recorded ≠ repository state correct; a valid graph can contain unwanted commits or omit unreachable/local history from a chosen view.
- Log order ≠ simple chronological truth; topology and timestamps can differ.
- Author timestamp ≠ integration time; author and committer metadata have different meanings.
- Visible branch history ≠ all recoverable history; reflogs or unreachable objects may exist locally.
First checks
git log --oneline --graph— historygit log -p -- <file>— file historygit blame <file>— line origins
Verify in this order
commits → history → investigation
Where it usually breaks
Git history proves recorded ancestry and metadata for reachable objects, not that commits were reviewed, built, deployed or operationally correct.
Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.
History Git boundary map
| Boundary | Healthy evidence | Suspicious evidence |
|---|---|---|
| Local state | Repository, HEAD, worktree/index and commit IDs are explicit | Wrong repo/ref, hidden staged/untracked state or mutable-name ambiguity |
| History / refs | Ancestry and branch/tag movement match intent | Unexpected rewrite, stale tracking ref or unclear merge base |
| Remote sync | URL/refspec, auth and remote read-back match expected commits | Local assumptions, rejection, stale fetch or unsafe force update |
| Downstream proof | Build/reconciliation/target is verified independently | Push/tag/merge success treated as deployment success |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5477