【Git】Git 修改刚提交的 commit message

Git 修改 commit message

  1. 修改最近一次的commit 信息
    git commit --amend
    然后就会进入vim编辑模式

  2. 比如要修改的commit是倒数第三条,使用命令:
    git rebase -i HEAD~3

  3. 退出保存 :wq

  4. 执行 git rebase --continue

  5. 执行 git push -f 推送到服务端。

参考文章:博客园 - Git 修改commit message

发布了552 篇原创文章 · 获赞 201 · 访问量 18万+

猜你喜欢

转载自blog.csdn.net/sinat_42483341/article/details/103981025