On Github every time I merge a pull request into my base branch I get an extra merge commit:
Merge pull request #77 ...
I prefer to get a git history without these merge commits.
How can I achieve that?
Here are your options:
A squash will result in a single new commit representing all changes at the head of the main branch. It is a special case of rebase.
A rebase will result in one or more new commits (any or all of which may be in a "broken"/unbuildable state) at the head of the main branch.
A merge creates a merge commit and leaves history as it really happened.
Here is documentation of the options: https://github.com/blog/2243-rebase-and-merge-pull-requests
To get a git history without any pull request merge commits I can use the merge button (Pull request page) and perform a rebase and 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