Merge
Combining multiple sequences of commits into one unified history in version control.
Also known as: Merging, Git Merge
Category: Concepts
Tags: software, version-control, workflows, collaboration, integration
Explanation
Merging is the process of integrating changes from different branches or development lines into a single unified history. In version control systems like Git, merge combines the changes from one branch (source) into another branch (target), preserving the history of both.
When you merge, the version control system automatically combines changes that don't conflict. If both branches modified the same lines of code, a merge conflict occurs, requiring manual resolution to decide which changes to keep. Once conflicts are resolved, the merge creates a new commit that has multiple parent commits, showing where the branches came together.
There are different merge strategies: fast-forward (moving the pointer when no divergence occurred), recursive (the default three-way merge), and squash (combining all commits from a branch into a single commit). Each has trade-offs between preserving history and maintaining a clean commit log.
Merging represents integration moments—times when parallel work streams come together. The act of merging forces reconciliation of different approaches and reveals conflicts that need resolution. In knowledge work, merging can represent synthesizing different perspectives, combining notes from multiple sources, or integrating experimental ideas into main thinking.
The merge-based workflow encourages parallel development, experimentation in isolation, and deliberate integration points. Pull requests formalize this by adding review before merging, turning integration into a quality control checkpoint.
Related Concepts
← Back to all concepts