This article helps you how can change Commit Message Or Author Name after push on GitHub.
git rebase -i <commit hash you want to change>^
- For any commit, you wish to change the message, change
- Save and quit (in vi:
- For each such commit, you’ll get an editor to edit the commit message. Change it as you see fit, save and quit.
Once you’re done editing all the commit messages, you’ll return to the command prompt, and have a new tree with the updated messages.
- You can now upload them to GitHub by using
git push origin --force.
If you just need to fix your last commit, you can replace steps 1 – 4 with
git commit --amend.
Hope this helps. Thanks.