What is the difference between git merge –squash and a regular merge?

Git Hard

Git — Hard

What is the difference between git merge –squash and a regular merge?

Key points

  • Squashing merges collapse commits into staged changes
  • Regular merges preserve commit history and create a merge commit
  • Merge commits link the histories of both branches
  • Squash merges do not create a merge commit

Ready to go further?

Related questions