Just say you have a development branch with 100 mostly pointless commit/log messages. Is it possible to merge the dev branch to the master/head and have only one log message in the master branch? ie one log message on the head/master branch might say "Adds features XYZ"
It seems there are two correct answers. Using squash allows you to hide all of the commits from the master branch, and using interactive rebase allows you to hide selected parts of the history from the master branch.
With --no-commit perform the merge and stop just before creating a merge commit, to give the user a chance to inspect and further tweak the merge result before committing. Note that fast-forward updates do not create a merge commit and therefore there is no way to stop those merges with --no-commit.
git-merge --squash
followed by git commit
should do this.
(More documentation on git-merge)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With