Rebase and merge pull requests
The merge button on pull requests supports two great workflows with merge commits and commit squashing. Now you can use the merge button to rebase and merge your changes, too.…
The merge button on pull requests supports two great workflows
with merge commits and commit squashing.
Now you can use the merge button to rebase and merge your changes, too.
How does it work?
When you select the new “Rebase and merge” option,
the commits from the pull request’s branch are rebased on to the tip
of the base branch, and then the base branch itself is fast forwarded
to this newly rebased head. Rebases automatically set the committer of
the rebased commits to the current user, while keeping authorship
information intact.
The pull request’s branch will not be modified by this operation.
If a rebase can’t be performed due to conflicts, we’ll let you know so
you can manually resolve them as necessary.
As with “Squash and merge”, repository administrators can decide whether they
want to allow this new option on the repository settings page.
Learn more about rebase and merge in our Help docs.
Written by
Related posts
Boost your CLI skills with GitHub Copilot
Want to know how to take your terminal skills to the next level? Whether you’re starting out, or looking for more advanced commands, GitHub Copilot can help us explain and suggest the commands we are looking for.
Beginner’s guide to GitHub: Setting up and securing your profile
As part of the GitHub for Beginners guide, learn how to improve the security of your profile and create a profile README. This will let you give your GitHub account a little more personality.
Beginner’s guide to GitHub: Merging a pull request
As part of the GitHub for Beginners guide, learn how to merge pull requests. This will enable you to resolve conflicts when they arise.