Add documentation for changing commit messages
Problem to solve
GitLab's documentation does not cover the full process for changing commit messages.
The https://docs.gitlab.com/ee/topics/git/useful_git_commands.html#create-a-new-message-for-last-commit page only includes the git commit --amend
command under the section "Create a new message for last commit". There is no documentation on changing older commit messages or the use of git push --force-with-lease
.
Further details
This causes problems for contributors and team members when a request is made to change a commit message but we have no documentation to cover the process. See an example exchange between a wider community contributor and team member here: !118460 (comment 1364089831)
Proposal
Including the full process on the Frequently used commands page or adding this as a subpage would solve this issue. The documentation should be clear for both team members and wider community contributors new to using git.
Who can address the issue
This issue is open to wider community contributors.