Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use rebases instead of merge commits #10052

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,14 @@ pull_request_rules:
- actions:
queue:
name: default
# Merge into master with a merge commit
method: merge
# Update the pr branch with rebase, so the history is clean
update_method: rebase
# Merge into master with a rebase
# NB. must use "squash" here so the squash commit contains the PR
# number fr changelog-d. If you really need it to not be squashed,
# use merge+no rebase.
method: squash
# both update methods get absorbed by the squash, so we use the most
# reliable
update_method: merge
name: Put pull requests in the rebase+merge queue
conditions:
- base=master
Expand Down Expand Up @@ -60,8 +64,8 @@ pull_request_rules:
- actions:
queue:
name: default
# Merge with a merge commit
method: merge
# Merge with a rebase
method: rebase
# Update the pr branch with rebase, so the history is clean
update_method: rebase
name: Put backports in the rebase+merge queue
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,9 @@ Currently there is a 2 day buffer for potential extra feedback between the last
update of a pull request (e.g. a commit, a rebase, an addition of the `merge me`
label) and the moment the Mergify bot picks up the pull request for a merge.

If your pull request consists of several commits, consider using `squash+merge
me` instead of `merge me`: the Mergify bot will squash all the commits into one
and concatenate the commit messages of the commits before merging.
Currently `merge me` and `squash+merge me` do the same thing. If you need to
preserve the individual commits, you must use `merge+no rebase` (see below).
Please rebase manually beforehand, if you can.

There is also a `merge+no rebase` label. Use this very sparingly, as not rebasing
severely complicates Git history. It is intended for special circumstances, as when
Expand Down
Loading