Skip to content

Commit 9894f70

Browse files
committed
Mention @bors squash in squashing documentation
1 parent 38b9dd2 commit 9894f70

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/git.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,11 @@ Both the upside and downside of this is that it simplifies the history.
383383
On the one hand, you lose track of the steps in which changes were made, but
384384
the history becomes easier to work with.
385385

386+
The easiest way to squash your commits in a PR on the `rust-lang/rust` repository is to use the `@bors squash` command in a comment on the PR. By default, [bors] combines all commit messages of the PR into the squashed commit message. To customize the commit message, use `@bors squash msg=<commit message>`.
387+
388+
389+
If you want to squash commits using local git operations, read on below.
390+
386391
If there are no conflicts and you are just squashing to clean up the history,
387392
use `git rebase --interactive --keep-base main`.
388393
This keeps the fork point of your PR the same, making it easier to review the diff of what happened
@@ -410,11 +415,6 @@ because they only represent "fixups" and not real changes.
410415
For example,
411416
`git rebase --interactive HEAD~2` will allow you to edit the two commits only.
412417

413-
For pull requests in `rust-lang/rust`, you can ask [bors] to squash by commenting
414-
`@bors squash` on the PR.
415-
By default, [bors] combines all commit messages in the PR.
416-
To customize the commit message, use `@bors squash [msg|message=<commit-message>]`.
417-
418418
[bors]: https://github.com/rust-lang/bors
419419

420420
### `git range-diff`

0 commit comments

Comments
 (0)