Commit
A snapshot of changes in version control, representing a specific point in the project's history.
Also known as: Git Commit, Commit Message, Changeset
Category: Concepts
Tags: software, version-control, workflows, best-practices, documentation
Explanation
A commit is the fundamental unit of change in version control systems. It represents a snapshot of your project at a specific moment, capturing what changed, who made the change, when it happened, and why (through the commit message). Each commit is immutable and uniquely identified by a hash.
Creating a commit is a deliberate act that packages related changes into a logical unit. Good commits are atomic (one logical change), have clear messages explaining the why (not just the what), and represent working states of the project. The commit message serves as documentation, explaining the reasoning behind changes for your future self and collaborators.
Commits form a chain, each pointing to its parent, creating a complete history of how the project evolved. This enables time travel (checking out any previous state), understanding context (seeing why decisions were made), and attribution (knowing who to ask about specific changes). Commits can be referenced, compared, reverted, or cherry-picked to other branches.
The practice of committing frequently creates checkpoints you can return to if experiments fail. Committing with clear messages forces articulation of what you're doing and why, bringing clarity to your work. Small, focused commits are easier to understand, review, and selectively apply elsewhere.
For knowledge work, the commit mindset means capturing progress incrementally with clear annotations. Rather than working for hours before saving, commit ideas as they develop. The commit history becomes a record of how your understanding evolved, creating learning artifacts and documentation of your thinking process.
Related Concepts
← Back to all concepts