Re-organize Changing a commit message documentation #158
Description
What feature or product is affected?
Local and remote commits
What is the new or expected behavior?
A user has written in asking if the documentation at
https://help.github.com/en/github/committing-changes-to-your-project/changing-a-commit-message
could be updated to clearly spell out that instructions 1-5 of the section about changing old commits can be used locally, even though the section as a whole is for updating old remote commits.
Content plan
-
We should make the headings H3 so that they show up in the TOC.
-
It's not necessary to split heading by local / remote, as this is GitHub documentation. Instead, we can have the last step be:
When you're ready to push your changes to GitHub, use the
push --force
command to force push over the old commit.
$ git push --force example-branch -
Remove the warning box at the top of the guide "In Git, the text of the commit message is part of the commit..." to make it part of the content, and then add the warning box about force pushing.
-
The titles should be changed to:
- Changing the message of the most recently pushed commit - combines the content from here and "Amending the message of the most recently pushed commit"
- Changing the message of older or multiple commit messages