追加修改
# 暂存当前文件状态
git stash
# 将 HEAD 移动到需要修改的 commit 上
git rebase 9633cf0919^ --interactive
# 找到需要修改的 commit ,将首行的 pick 改成 edit
# 开始着手解决你的 bug
# 将改动文件添加到暂存
git add .
# 追加改动到提交
git commit –amend
# 移动 HEAD 回最新的 commit
git rebase –continue
# 恢复之前的工作状态
git stash pop
合并多个commit信息
# 移动到要合并到的 commit
git rebase -i 2ba4f3f...
# 将除去第一个 pick 全部改成 squash, 表示这个 commit 会被合并到前一个commit
# :wq保存退出
# 重新编辑commit信息
# :wq保存退出
# 移动 HEAD 回最新的 commit
git rebase –continue