git edit last commit message

edx
edx
90 Points
30 Posts

I'm using gitbash. I want to edit last commit message. And it's in local and not pushed to server.

 

Views: 62
Total Answered: 1
Total Marked As Answer: 0
Posted On: 17-Mar-2021 22:12

Share:   fb twitter linkedin
Answers
beginer
beginer
216 Points
63 Posts
         

Type git commit --amend and press Enter. In your text editor, edit the commit message, and save the commit.

OR, do inline comment as:

$ git commit --amend -m "New and correct message"
Posted On: 19-Mar-2021 02:17
 Log In to Chat