1. Create a merge commit
PR commit log:
| |
Integration branch commit log:
| |
Create a merge commit carries every commit in the PR over to the integration branch intact, and adds one PR commit entry on top.
2. Squash and merge
PR commit log:
| |
Integration branch commit log:
| |
After a Squash and merge, the integration branch gains only a single commit entry. It looks clean, and it is friendly to PRs with many commits, so it is worth recommending. Both the PR title and description can be viewed directly on the integration branch.
3. Rebase and merge
PR commit log:
| |
Integration branch commit log:
| |
Rebase and merge carries every commit in the PR over to the integration branch intact. Also, if the development branch has not been rebased, continuing to push commits for the PR record looks like this:
| |
But code that has already been merged will not be merged again; this only affects how the PR commit log looks.
