How to update last git commit message in local and remote repositories?

You can use git commit –amend option to update/modify the last commit message.


Create a new local git repository:

Create couple of commits in your local git repository:

Update the last git commit message in local git repository:

Create a new empty remote repository and add to your local repository:

Create a new commit to your local repository and push it to the remote repository:

Update last commit message in a remote git repository:

Leave a Reply