What is the difference between git merge –no-ff and git merge –ff-only?

Git Medium

Git — Medium

What is the difference between git merge –no-ff and git merge –ff-only?

Key points

  • `--no-ff` ensures a merge commit is always created
  • `--ff-only` fails if a merge commit is required
  • Fast-forward merges are skipped with `--no-ff`
  • Merge commits are mandatory with `--no-ff`
  • `--ff-only` prioritizes fast-forward merges

Ready to go further?

Related questions