Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 1.08 KB

merge-strategies.md

File metadata and controls

31 lines (20 loc) · 1.08 KB

Merge Strategies

Explicit Merge (a.k.a. non fast-forward)

  • Creates a new merge commit. (this will happen if you use --no-ff)

Non fast forward merge

Fast Forward Merge

  • Forward rapidly. Does not create a new commit.

Fast forward merge

Rebase

  • Integrates changes from one branch into another by changing the base of your current branch.
  • Creates a linear commit history.

Rebase

Squash

  • Combines all commits from a branch into a single commit when merging into the main branch.

Rebase


--no-ff Option

  • --no-ff option ensures that a fast forward merge will not happen.
  • A new commit object will always be created.
  • Good if you want git to maintain a history of feature branches.