git rebase 修改历史commit注释

1. 选取最近3次的历史提交。 // git rebase -i HEAD~3
2. 按i 进入vim编辑模式
3. 基于以下指令进行修改
    r, reword <commit> = use commit, but edit the commit message // 修改commit信息
    s, squash <commit> = use commit, but meld into previous commit // 合并到上次commit
    f, fixup <commit> = like "squash", but discard this commit's log message // 合并到上次commit,同时丢弃这个commit注释信息

4. 按esc退出编辑模式
5. 输入  :wq  保存并退出
posted @ 2022-07-03 13:55  IslandZzzz  阅读(224)  评论(0编辑  收藏  举报