您的位置:首页 > 其它

git push后修改错误的commit message

2013-12-16 16:42 483 查看
Easiest solution (but please read this whole answer before doing this):

git rebase -i <hash-of-commit-preceding-the-incorrect-one>(这里可以用要改的那次的hash,如果是前一两次也可以用HEAD^或者HEAD^^)

In the editor that opens, change
pick
to
reword
on the line for the incorrect commit.
Save the file and close the editor.
The editor will open again with the incorrect commit message. Fix it.
Save the file and close the editor.
git push --force
to update GitHub.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: