Category Archives: Squash Merge

WHAT IS A GIT SQUASH MERGE? HOW TO USE IT?

What is a git squash merge? How to use it?

Advantages:

This will take all the commits from the bugfix branch, squash them into 1 commit and then merge it with your master branch. … git checkout master git mergefeature1 feature2 feature3 etc. The last merge is an “octopus merge” because it’s merging a lot of branches at once

You can follow the below commands to use Squash:

git checkout master
git merge –squash bugfix
git commit
This will take all the commits from the bugfix branch, squash them into 1 commit and then merge it with your master branch.