Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save fzitou/e18ac397adee3b8ba05c922b1a0c530d to your computer and use it in GitHub Desktop.

Select an option

Save fzitou/e18ac397adee3b8ba05c922b1a0c530d to your computer and use it in GitHub Desktop.
[git修改之前某一个特定的commit] #git
git log #查看commit id 找到上一笔commit id
git rebase 928fc8a3686bf5fcf4527873e075703a9998c127 --interactive

然后在vi中修改pick为edit,wq保存退出,接着进行内容修改,git add后git commit --amend

最后git rebase --continue即可再次回到最新的头部

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment