Squash Commit
Squashing combines the changes from several commits into one new commit, often with interactive rebase or a merge rule.
Another example
Five private fixup commits together make one reviewed feature. Squashing keeps the final code difference and one clear message, but careless squashing can erase useful review or author history.
Main parts
- 01source commits
- 02combined diff
- 03new commit message
Use it when
Use this term when several unpublished commits make one logical change and their small-step history is not needed.
Do not use it when
Do not squash separate changes, shared history, or evidence needed for review and credit.
Name used in code
pick A + squash B + fixup C → A′ Before you ship
Before publishing, check the exact repository, branch, target, and diff. Keep unpublished work. Pass review and CI checks. Record conflict and data-loss risks, release order, traceability, recovery, and rollback.
Outcome: Use Squash Commit to release or recover the change safely, with a clear record. User context: Five private fixup commits together make one reviewed feature. Squashing keeps the final code difference and one clear message, but careless squashing can erase useful review or author history. Delivery concept or operation: Squash Commit. Why it fits: Use this term when several unpublished commits make one logical change and their small-step history is not needed. Do not use it when: Do not squash separate changes, shared history, or evidence needed for review and credit. Delivery requirements: Name the code repository and target. List preconditions, changes, review and CI checks, conflict and data-loss risks, release order, and the rollback or recovery command. Repository safeguards: Keep unpublished work and a clear history. Do not run destructive steps without an explicit backup. Check the exact code diff and remote target before publishing. Acceptance criteria: Review the intended diff and pass all required checks. Keep the target version traceable. Practice failure recovery and keep published history clear. Evidence and limits (evidence boundary): It is official for that source. Other platforms or teams may use the term in another way. Unknowns to confirm: Repository, branch, team activity, release environment, approval owner, protected checks, and rollback target.
Check this request
Review the current use of Squash Commit. Definition: Squashing combines the changes from several commits into one new commit, often with interactive rebase or a merge rule. Release checks: Before publishing, check the exact repository, branch, target, and diff. Keep unpublished work. Pass review and CI checks. Record conflict and data-loss risks, release order, traceability, recovery, and rollback. Before changing code, report the evidence you found, gaps, severity, and the smallest safe fix.