Skip to content

Latest commit

 

History

History
17 lines (11 loc) · 666 Bytes

squash_merge.md

File metadata and controls

17 lines (11 loc) · 666 Bytes

Squash Merge

Often when working on a branch you have several commits before you end with the solution you want. All this back and forth, experiments, house-keeping etc. is important, but it can make your clutter up commit history.

In order to get a clean history, squashing merges, result in a more readable commit log.

$ git checkout master
$ git merge --squash bug_fix_branch
$ git commit

Omitting the -m parameter lets you modify a draft commit message containing every message from your squashed commits before finalizing your commit.

References