Skip to content

Instantly share code, notes, and snippets.

@ciases
Last active November 16, 2017 13:00
Show Gist options
  • Save ciases/29a419bffe418dca04467eab41f0fed7 to your computer and use it in GitHub Desktop.
Save ciases/29a419bffe418dca04467eab41f0fed7 to your computer and use it in GitHub Desktop.
git squash

GIT SQUASH

Say your bug fix branch is called bugfix and you want to merge it into master:

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment