Skip to content

Commit 52e6214

Browse files
committed
contributing: clarify when to update a branch vs avoid during review
1 parent a03c1ef commit 52e6214

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/contributing.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,11 @@ The CI in rust-lang/rust applies your patches directly against the current maste
154154
not against the commit your branch is based on. This can lead to unexpected failures
155155
if your branch is outdated, even when there are no explicit merge conflicts.
156156

157-
Before submitting or updating a PR, make sure to update your branch
158-
as mentioned [here](git.md#keeping-things-up-to-date) if it's significantly
159-
behind the master branch (e.g., more than 100 commits behind).
160-
This fetches the latest master branch and rebases your changes on top of it,
161-
ensuring your PR is tested against the latest code.
157+
Update your branch only when needed: when you have merge conflicts, upstream CI is broken and blocking your green PR, or a maintainer requests it. Avoid updating an already-green PR under review unless necessary. During review, make incremental commits to address feedback. Prefer to squash or rebase at the end, and do so when a reviewer requests it.
162158

163-
After rebasing, it's recommended to [run the relevant tests locally](tests/intro.md) to catch any issues before CI runs.
159+
When updating, use `git push --force-with-lease` and leave a brief comment explaining what changed. Some repos prefer merging from `upstream/master` instead of rebasing; follow the project's conventions. See [keeping things up to date](git.md#keeping-things-up-to-date) for detailed instructions.
160+
161+
After updating, run local checks (e.g., `mdbook build` for this repo) to catch issues before CI runs.
164162

165163
### r?
166164

0 commit comments

Comments
 (0)