How to use GIT merge –squash?

Say your bug fix branch is called bugfix then on the master branch issue the following command:

git merge --squash -m 'fix bug' bugfix

 

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s