Skip to content

Commit 1bc9c4e

Browse files
ofrobotsMylesBorins
authored andcommitted
doc: reorder section on updating PR branch
It makes more sense to provide instructions on how to update the PR branch before instructions on pushing the commit. PR-URL: #18355 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me>
1 parent 0f593be commit 1bc9c4e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

COLLABORATOR_GUIDE.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -593,20 +593,20 @@ Validate that the commit message is properly formatted using
593593
$ git rev-list upstream/master...HEAD | xargs core-validate-commit
594594
```
595595

596+
Optional: When landing your own commits, force push the amended commit to the
597+
branch you used to open the pull request. If your branch is called `bugfix`,
598+
then the command would be `git push --force-with-lease origin master:bugfix`.
599+
When the pull request is closed, this will cause the pull request to
600+
show the purple merged status rather than the red closed status that is
601+
usually used for pull requests that weren't merged.
602+
596603
Time to push it:
597604

598605
```text
599606
$ git push upstream master
600607
```
601-
* Optional: Force push the amended commit to the branch you used to
602-
open the pull request. If your branch is called `bugfix`, then the
603-
command would be `git push --force-with-lease origin master:bugfix`.
604-
When the pull request is closed, this will cause the pull request to
605-
show the purple merged status rather than the red closed status that is
606-
usually used for pull requests that weren't merged. Only do this when
607-
landing your own contributions.
608608

609-
* Close the pull request with a "Landed in `<commit hash>`" comment. If
609+
Close the pull request with a "Landed in `<commit hash>`" comment. If
610610
your pull request shows the purple merged status then you should still
611611
add the "Landed in <commit hash>..<commit hash>" comment if you added
612612
multiple commits.

0 commit comments

Comments
 (0)