Commit
A recorded snapshot of a project with a message explaining it.
A commit is a recorded state of a project together with metadata: authorship, timestamps, parent commits, and a message. It is the unit of history, the unit of revert, and the unit of bisection.
The message is the part with the longest life. A diff shows what changed; only the message can say why, and it is the only explanation that survives in a form nobody has to maintain. A useful message states the motivation and any constraint that shaped the approach — the information a reader a year later cannot reconstruct.
A few mechanical facts worth knowing. Commits record two dates, author and committer, and only the second is rewritten by a rebase — so author dates survive history rewriting and are what you want when reconstructing when something was actually written. Commit messages are never rewritten by a rebase, so a rebase past a change that removed the commit's subject leaves a message narrating work the diff no longer contains. And commit counts between branches are misleading once anything has been squashed, since the same content appears under different hashes.
Staging deserves care in shared working directories: a bulk "add everything" sweeps in other people's in-flight work under your message, producing history that lies. See Atomic Commit.
See also14
Conventional Commits
A lightweight convention giving commit messages a machine-readable type and scope.
Version Control & Delivery14 connections
Version Control
A system recording the history of a project's files, enabling branching, merging, and recovery.
Version Control & Delivery26 connections
Provenance
The recorded origin of a change or a claim — who made it, when, and on what evidence.
Method44 connections
Squash Merge
Collapsing a branch's commits into one before merging, trading granularity for a clean main history.
Version Control & Delivery24 connections
Rebase
Replaying a branch's commits onto a new base, producing new commits with the same changes.
Version Control & Delivery19 connections
Three-Way Merge
Combining two lines of work by comparing both against their common ancestor.
Version Control & Delivery17 connections
Regression
A previously working behavior that a change has broken.
Method23 connections
Plausible Mechanism
A causal explanation that was inferred rather than tested, and reads as more rigorous for being specific.
Method63 connections
Fast-Forward Merge
The two basic ways Git joins branches, by sliding a branch pointer forward or by recording a new commit with two parents, and how the choice shapes a project's history.
Version Control & Delivery14 connections
Commit Message
The note attached to each change in version control, conventionally a short summary line and a body explaining why, which becomes the main record of intent for anyone who later wonders why the code is the way it is.
Version Control & Delivery13 connections
Staging Area
The intermediate snapshot in Git between the working files and the next commit, which lets a developer choose exactly which changes go into each commit, down to individual lines.
Version Control & Delivery15 connections
Detached HEAD
The Git state in which the current checkout points directly at a commit rather than a branch, harmless for looking around but a trap for new work, since commits made there belong to no branch and can quietly disappear.
Version Control & Delivery11 connections
Git Object Model
Git stores every version of a project as a graph of immutable objects named by the hashes of their contents, blobs for files, trees for directories, and commits for snapshots, which makes history tamper-evident and identical content free to store twice.
Version Control & Delivery12 connections
Git Hook
Scripts Git runs automatically at points such as committing or pushing, used to check formatting and messages locally, and on servers to enforce policy or trigger deploys.
Version Control & Delivery15 connections
Linked from20
- Atomic CommitVersion Control & Delivery
A commit containing exactly one logical change, complete and independently sound.
- ChangelogVersion Control & Delivery
A curated, human-readable record of the notable changes in each version of a project, written for the people who use it rather than the people who built it.
- Cherry-PickVersion Control & Delivery
Copying the change from one commit onto another branch as a new commit, the standard way to backport a fix without merging everything else that came with it.
- Commit MessageVersion Control & Delivery
The note attached to each change in version control, conventionally a short summary line and a body explaining why, which becomes the main record of intent for anyone who later wonders why the code is the way it is.
- Conventional CommitsVersion Control & Delivery
A lightweight convention giving commit messages a machine-readable type and scope.
- Detached HEADVersion Control & Delivery
The Git state in which the current checkout points directly at a commit rather than a branch, harmless for looking around but a trap for new work, since commits made there belong to no branch and can quietly disappear.
- DiffVersion Control & Delivery
The listing of changes between two versions of a file, the algorithms that compute it, and the unified format that code review, patches, and merges are built on.
- Fast-Forward MergeVersion Control & Delivery
The two basic ways Git joins branches, by sliding a branch pointer forward or by recording a new commit with two parents, and how the choice shapes a project's history.
- Force PushVersion Control & Delivery
Overwriting a remote branch with local history that doesn't contain it, the operation that makes rewritten history shareable and silently deletes other people's work when used carelessly.
- Git BisectTesting & Verification
Finding the commit that introduced a bug by binary search through history, testing the midpoint between a known-good and a known-bad version until one commit remains.
- Git BlameVersion Control & Delivery
Showing, for every line of a file, the commit and author that last changed it, the starting point for finding out why code is the way it is.
- Git HookVersion Control & Delivery
Scripts Git runs automatically at points such as committing or pushing, used to check formatting and messages locally, and on servers to enforce policy or trigger deploys.
- Git Object ModelVersion Control & Delivery
Git stores every version of a project as a graph of immutable objects named by the hashes of their contents, blobs for files, trees for directories, and commits for snapshots, which makes history tamper-evident and identical content free to store twice.
- Git StashVersion Control & Delivery
Git's shelf for uncommitted work, which clears the working tree so you can switch tasks, and the reasons a throwaway commit or a second worktree is often the better shelf.
- GitignoreVersion Control & Delivery
The file of patterns telling Git which files to leave untracked, such as build output, dependencies, editor clutter, and local secrets, along with the traps of files that were already tracked and secrets already committed.
- ProvenanceMethod
The recorded origin of a change or a claim — who made it, when, and on what evidence.
- RebaseVersion Control & Delivery
Replaying a branch's commits onto a new base, producing new commits with the same changes.
- Squash MergeVersion Control & Delivery
Collapsing a branch's commits into one before merging, trading granularity for a clean main history.
- Staging AreaVersion Control & Delivery
The intermediate snapshot in Git between the working files and the next commit, which lets a developer choose exactly which changes go into each commit, down to individual lines.
- Version ControlVersion Control & Delivery
A system recording the history of a project's files, enabling branching, merging, and recovery.