Skip to content

Commit 3a80104

Browse files
Farenheithtargos
authored andcommitted
doc: remove section about amending commits in PR guide
In my first contribution, I got the amending guidance wrongly and amended my commit to attend some requested changes. Amending commits is never required to author a PR in the project, and force pushing makes reviewing harder, so the PR guide should not recommend it as a good practice. PR-URL: #41287 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 58da5d9 commit 3a80104

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

doc/guides/contributing/pull-requests.md

+4-11
Original file line numberDiff line numberDiff line change
@@ -306,17 +306,10 @@ $ git push --force-with-lease origin my-branch
306306
```
307307

308308
**Important:** The `git push --force-with-lease` command is one of the few ways
309-
to delete history in `git`. Before you use it, make sure you understand the
310-
risks. If in doubt, you can always ask for guidance in the pull request.
311-
312-
If you happen to make a mistake in any of your commits, do not worry. You can
313-
amend the last commit (for example if you want to change the commit log).
314-
315-
```text
316-
$ git add any/changed/files
317-
$ git commit --amend
318-
$ git push --force-with-lease origin my-branch
319-
```
309+
to delete history in `git`. It also complicates the review process, as it won't
310+
allow reviewers to get a quick glance on what changed. Before you use it, make
311+
sure you understand the risks. If in doubt, you can always ask for guidance in
312+
the pull request.
320313

321314
There are a number of more advanced mechanisms for managing commits using
322315
`git rebase` that can be used, but are beyond the scope of this guide.

0 commit comments

Comments
 (0)