Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3a80104

Browse filesBrowse 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 <duhamelantoine1995@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 58da5d9 commit 3a80104
Copy full SHA for 3a80104

File tree

Expand file treeCollapse file tree

1 file changed

+4
-11
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-11
lines changed
Open diff view settings
Collapse file

‎doc/guides/contributing/pull-requests.md‎

Copy file name to clipboardExpand all lines: doc/guides/contributing/pull-requests.md
+4-11Lines changed: 4 additions & 11 deletions
  • Display the source diff
  • Display the rich diff
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.