Sometimes we need to change the git commit message which can be either pushed/not-pushed commit, here is how we can change the git commit message.
To change commits which are not pushed
git commit --amend
commits which are already pushed
git commit --amend
git push origin master --force
By using --force
we can update our commit message on remote repo also
Top comments (0)