Interview prompt
Explain git history as a reproducible change record to an engineer who understands the surrounding system but has not used this technique. Walk from its contract to a concrete operation, then discuss where it fails or becomes expensive.
A strong answer
Git records snapshots and relationships between commits. A branch is a movable reference to a commit; creating a branch is cheap because it does not copy the repository. This model supports parallel work, review, and recovery when changes are small and their intent is clear.
A commit records a tree plus metadata and parent references. A merge combines histories while preserving their ancestry; a rebase reapplies commits onto a new base and changes their identities. Pull requests use these histories to make a proposed change reviewable before integration.
A complete answer also calls out the assumptions that control correctness. Git does not automatically make a change correct or safe. Large mixed-purpose commits obscure intent, and rewriting a shared branch can disrupt collaborators. A clean history helps investigation, but preserve the original evidence when correcting a production incident.
Close by describing one representative test or measurement. A feature branch contains one implementation commit and one unrelated formatting commit. Explain how splitting the changes improves review and how rebase affects commit identifiers.
Follow-up questions
Answer the follow-ups in the frontmatter. Use the linked article for the concept and the trace to make the explanation concrete.