The words in git commit message that found a project today are misspelled and need to be modified. However, this simple modification requires git rebase to complete.
First, Git rebase to the first 1 commits that need to modify the message. Assuming the commit ID is 32e0a87f, run the following git rebase command:
Git rebase-i 32e0a87f
After running the above command in Git bash, the edit box will pop up, and in the edit box, all the commit message after this commit that starts with pick will be displayed in turn.
Change the "pick" to "reword" before the commit message you want to modify, click the Save button and close the edit box, and the Rebase action will be performed.
Rebasing (1/3)
Then the edit box will pop up again, this time the edit box only changed to "reword" the commit message, at this time to modify the contents of the commit message, click the Save button and close the edit box, will continue to perform the rebase operation.
If the operation succeeds, the following prompt appears:
[Detached HEAD aa3b52c] ADD return URL 2 files changed, 1 insertion (+), 3 deletions (-) successfully rebased and updated Refs/heads/oss.
This completes the modification of the GIT commit message and then forces the push to take care of it.
git push--force
Resources
Changing a COMMIT message
Modifying a commit message via Git rebase