# Git 修改任意一条提交记录信息 <img width="677" alt="git rebase -i b5785a8" src="https://user-images.githubusercontent.com/22309277/58219761-a3bc9400-7d3e-11e9-9093-aeed8803504e.png"> 1. `git rebase -i 目标 commit id 的上一条 commit id` 例如:`git rebase -i b5785a8`; 2. 在编辑界面中指定需要操作的 commits 以及操作类型(将要修改的 commit 类型 pick 改成 edit); 3. 修改提交记录 `git commit --amend` ; 4. `git rebase --continue` 交互合并完成; 5. 中途出错可以 `git rebase --abort` 恢复初始状态。