Squash Merge
Collapsing a branch's commits into one before merging, trading granularity for a clean main history.
A squash merge collapses every commit on a branch into a single commit on the target branch. The main line gains one commit per change, and the branch's intermediate steps disappear from it.
The trade is explicit. History on the main branch becomes clean and uniform — one entry per unit of work, easy to scan, easy to revert. The intermediate commits, including their individual messages, are gone from that history.
Two consequences follow that people meet in practice rather than in theory.
The squashed commit's message becomes the permanent record. Whatever the change description says is what the repository will hold, which is what makes an unverified claim in it a durable false statement. See Provenance and Plausible Mechanism.
The branch's commits are no longer ancestors of the main line. Any work still based on them has a base that main does not contain, so a subsequent push recreates the deleted branch as an orphan and a merge does strange things. Recovering means cherry-picking the wanted commits onto a fresh branch cut from the current main.
Squash merging pairs naturally with Trunk-Based Development, where branches are short and their internal steps are working notes rather than history worth keeping.
See also11
Commit
A recorded snapshot of a project with a message explaining it.
Version Control & Delivery23 connections
Atomic Commit
A commit containing exactly one logical change, complete and independently sound.
Version Control & Delivery19 connections
Branching Model
The convention governing what branches exist, what they mean, and how work reaches production.
Version Control & Delivery18 connections
Pull Request
A proposal to merge a branch, carrying review, automated checks, and the discussion around it.
Version Control & Delivery25 connections
Code Review
A second person reading a change before it lands, and the practices that make it worth the time.
Version Control & Delivery38 connections
Version Control
A system recording the history of a project's files, enabling branching, merging, and recovery.
Version Control & Delivery26 connections
Feature Branch
A branch created to develop one change in isolation before merging it back, a workflow that keeps the main line stable but grows riskier the longer the branch lives, since its divergence from everyone else's work compounds.
Version Control & Delivery16 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
Git Bisect
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.
Testing & Verification17 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
Git Blame
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.
Version Control & Delivery12 connections
Linked from21
- Atomic CommitVersion Control & Delivery
A commit containing exactly one logical change, complete and independently sound.
- Branch ProtectionVersion Control & Delivery
Server-side rules that stop people from pushing straight to important branches, requiring reviews, passing checks, and intact history instead.
- Branching ModelVersion Control & Delivery
The convention governing what branches exist, what they mean, and how work reaches production.
- 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.
- Code ReviewVersion Control & Delivery
A second person reading a change before it lands, and the practices that make it worth the time.
- CommitVersion Control & Delivery
A recorded snapshot of a project with a message explaining 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.
- Commit SigningVersion Control & Delivery
Cryptographically signing Git commits so a commit's author can be verified rather than merely claimed, the key types used, and what a green verified badge does and does not prove.
- Conventional CommitsVersion Control & Delivery
A lightweight convention giving commit messages a machine-readable type and scope.
- 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.
- Feature BranchVersion Control & Delivery
A branch created to develop one change in isolation before merging it back, a workflow that keeps the main line stable but grows riskier the longer the branch lives, since its divergence from everyone else's work compounds.
- 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 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.
- Interactive RebaseVersion Control & Delivery
Git's tool for rewriting a series of commits before sharing them, reordering, combining, splitting, and rewording them so the history tells a clear story rather than recording every false start.
- ProvenanceMethod
The recorded origin of a change or a claim — who made it, when, and on what evidence.
- Pull RequestVersion Control & Delivery
A proposal to merge a branch, carrying review, automated checks, and the discussion around it.
- ReflogVersion Control & Delivery
Git's private record of everywhere HEAD and each branch has pointed, the safety net that makes a botched reset, rebase, or deleted branch recoverable for weeks.
- Trunk-Based DevelopmentVersion Control & Delivery
Everyone integrating into one shared branch continuously, with short-lived feature branches.
- Version ControlVersion Control & Delivery
A system recording the history of a project's files, enabling branching, merging, and recovery.