changing the commit message in git

Possible Duplicate:
How do I edit an incorrect commit message in Git?

I am trying to edit the commit message for a previous commit.

this the git log output:

commit B
Author my name
date   2
message 2

commit A
Author my name
date   1
message 1

How to edit the message1?


git rebase -i HEAD^^ should give you option to change two last commits, then you can choose to amend commit A and change its log message. Note that this will change hash of both commit A and commit B, so if anyone has already pulled your changes, they will get weird conflicts.

链接地址: http://www.djcxy.com/p/1408.html

上一篇: 如何将文件添加到最后的本地提交?

下一篇: 在git中更改提交消息