git edit last commit message

edx
edx
506 Points
24 Posts

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

 

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

Share:   fb twitter linkedin
Answers
beginer
beginer
1544 Points
52 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