# Merge Strategies — GitHub

Source: https://www.geekswithgeeks.com/en/github/gh-pr-merge-strategies

> Merge commit, squash, or rebase — three ways to bring a PR into the base branch.

## Merge commit

Creates a merge commit that preserves the full branch history — GitHub's default option.

## Squash and merge

Combines every commit on the branch into a single commit on the base branch — keeps `main`'s history clean and linear.

## Rebase and merge

Replays the branch's individual commits onto the tip of the base branch without creating a merge commit — linear history, full commit detail.
