您好,欢迎来到二三娱乐。
搜索
您的当前位置:首页git rebase 修改commit message

git rebase 修改commit message

来源:二三娱乐

注意⚠️

可以用git log看提交记录
也可以配置(git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit”)
就可以用git lg 查看

注意⚠️


image

这是在rebasing中的意思,如果遇到什么问题

直接git rebase --abort

  1. git rebase -i HEAD~3 (修改 最近三次的commit)


    image
  2. 接步骤1 ,按i(进入编辑)


    image
  1. 把你要改的commit节点的pick 改成 edit
image
ctrl+c,shift+q,然后wq退出,目前就选择了两个commit点进行rebase,
所以下面会执行两次git commit --amend
  1. git commit --amend (进入修改界面)


    image

然后wq退出

  1. git rebase --continue

注意⚠开始️重复动作!

  1. git commit --amend(修改下一个选择的commit)
image

然后wq退出

  1. git rebase --continue
image

因为只有选了两个节点所以就完了

  1. git lg 查看修改成功没有
image

Copyright © 2019- yule263.com 版权所有 湘ICP备2023023988号-1

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务