NEW
Also known as: Revision (VCS)
A recorded change in a version control system that captures a snapshot of tracked files with metadata like author, timestamp, and message.
DESCRIPTION
A commit represents a durable point in a project’s history, enabling traceability, rollback, and collaboration. In Git, commits store snapshots rather than diffs, supporting efficient branching and merging. Good commit messages explain intent and context for reviewers. Commits integrate with pull requests, CI pipelines, and release processes. Practices like small, atomic commits improve review quality and bisecting. Signed commits add provenance for security-sensitive workflows.
ALTERNATIVE DEFINITIONS
Pro Git Book
A commit in Git is a snapshot of your entire repository at a specific time.
Emphasizes Git’s snapshot model versus traditional delta storage.
Atlassian
A commit, or “revision”, is an individual change to a file (or set of files).
Highlights granular file-level changes and common terminology.
RELATED TERMS
Version Control Branch Merge Tags & Labels Pull Request Diff Repository Rebase Audit Trail Versioning
COMPETING TERMS
Snapshot (working tree)
RELATIONS
- Narrower: Two-Phase Commit
KNOWLEDGE AREAS
Software Engineering Collaboration Platform & Tooling
TARGET AUDIENCE
Software Developer Data Engineer Analytics Engineer MLOps Engineer DevOps Engineer Full Stack Developer Software Architect
EXTERNAL SOURCES
- Wikipedia - Commit (version control)
- Git - Official git commit command reference
- Conventional Commits - Commit message convention spec
TOP QUESTIONS
What metadata does a Commit contain?
It includes author and committer identities, timestamp, parent commit(s), tree snapshot, and a message describing the change. Signed commits also include cryptographic signatures.
Category: Overview
How big should a Commit be?
Aim for small, atomic commits that encapsulate a single logical change. This improves review quality and facilitates git bisect for debugging.
Category: BestPractice
What’s the difference between Commit and Push?
Commit records local changes in your repository. Push publishes those commits to a remote repository so others can fetch and review them.
Category: Misunderstanding
Why are good Commit messages important?
They provide context for reviewers and future maintainers, improving traceability, audits, and changelog generation. Clear intent reduces misunderstandings.
Category: Relevancy
What is a merge commit?
A merge commit has multiple parents, combining histories from different branches. It often results from pull request merges or manual merges.
Category: Example
How do signed Commits help security?
Signing commits with GPG or SSH verifies authorship and integrity, helping defend against supply chain attacks and impersonation.
Category: Security
When should I squash Commits?
Squash noisy or fix-up commits before merging to produce clean history. Retain separate commits when they capture distinct, useful steps.
Category: Management
How do Commits enable code review?
Commits form the unit of change for pull requests. Reviewers inspect diffs, tests, and messages to assess quality before approving merges.
Category: HowTo
Where can I learn better Commit practices?
Read the Pro Git book and Conventional Commits specification. Many teams publish internal guidelines aligned with their tooling.
Category: Learning