A commit is a saved snapshot of code changes in version control, each recorded with a message.
A commit is a saved snapshot of code changes in version control, recorded at a single point in time and stamped with a short message describing what changed. Think of it as a labeled save point in a project's history. Every time a developer finishes a meaningful piece of work, they commit it, creating a permanent record that can be revisited, compared, or restored later. The full sequence of commits forms the project's timeline, a story of how the code grew from its first line to its current state.
Mechanically, a commit captures the exact state of the tracked files at the moment it is made, along with metadata: who made it, when, and a written message explaining the change. Version control systems store this efficiently by recording what changed relative to the previous commit rather than duplicating every file each time. Each commit also carries a unique identifier, so any snapshot can be referenced precisely. Because commits are chained in order, the system can reconstruct the project as it existed at any past commit, show the difference between any two, or trace a single line of code back to the commit that introduced it. That last ability, often used to find when a bug appeared, is one of the most practical benefits of committing frequently.
The word comes from 'commit,' rooted in the Latin 'committere,' meaning to bring together or to entrust. In everyday use it means to formally dedicate oneself to something. In version control the sense is close to entrusting: you are formally recording a change into the project's permanent keeping. That framing is deliberate, because a commit is meant to be a considered, complete unit of work rather than a random midpoint.
For a business, commits are the backbone of accountability and recoverability on any website or application. When every change is captured as a discrete, described snapshot, a team can answer questions that would otherwise be guesswork: what changed last Tuesday, who did it, and why. If the live site starts misbehaving, the team can scan recent commits to identify the likely culprit and, if needed, restore an earlier snapshot. Good commit messages turn this history into documentation that new team members and future maintainers can actually read and trust.
The common mistakes are about discipline rather than mechanics. Committing too rarely, bundling a week of unrelated work into one massive snapshot, destroys the granularity that makes history useful, because you can no longer isolate a single change. Vague messages like 'fixed stuff' waste the opportunity to explain intent. On the other end, committing broken or half-finished code into a shared branch can disrupt everyone else. The healthy habit is small, focused commits, each doing one clear thing, each described plainly. Commits relate closely to adjacent version-control ideas: a group of commits is what gets proposed together in a pull request for review, and if a set of commits proves harmful once live, a rollback can wind the project back to a safer point. Understanding the commit is the foundation for understanding all of them.
Commits give your project a reliable, reversible history, so any change can be reviewed or undone. That safety net makes fast, confident development possible.