$0.48

How to change the most recent Git commit message?

Ask a question+
3

I have committed and make a mistake in the commit log message. What should I do?

Jack 590
add comment

1 Answer

2

You can do git commit — amend for modifying the log message of the previous commit without changing its snapshot. You can pass in a new message from the command line without receiving a prompt for opening an editor by using-m option.
git commit --amend -m "an updated commit message"

Ian 280
add comment

Your Answer