Skip to content

Merge

← All terms · Git fundamentals

The process of combining the code from one branch into another. It takes independent lines of development and integrates them into a single unified history.

What it is

A merge joins two or more commit histories together. When you merge a feature branch into the main branch, Git attempts to automatically combine the file changes. If changes conflict, the developer must manually resolve them before the merge can be finalized.

When you would use it

You use a merge when you have finished building a feature on a separate branch and want to officially add that feature to the main codebase.

Common operations

  • Integrating a completed feature branch into the main production branch.
  • Pulling upstream updates into your local working branch.

Related terms

Where this is taught

Going deeper