Open xgqfrms opened 2 years ago
https://github.com/xgqfrms/frontend-iterview-quetions-collection/commits/main
ccf9cf
e6d899
e6d899f479ade1ef90d06b5567a5abe964d4a2ae
$ git rebase -i HEAD~3
hint: Waiting for your editor to close the file... error: There was a problem with the editor 'vi'.
# 写入并退出
:wq!
# 写入并强制退出
:wq!
# 强制确认退出
:qa!
作者:xgqfrms 链接:https://www.cnblogs.com/xgqfrms/p/16465388.html 来源:https://www.cnblogs.com 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。 ©xgqfrms 2012-2022 www.cnblogs.com 发布文章使用:只允许注册用户才可以访问! 原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!
$ git rebase -i HEAD~3
# 等价于
# $ git rebase -i HEAD^2
# 修改 commit
$ git commit --amend
# ???
$ git rebase --continue
$ git push -f
# main
$ git log
$ git rebase -i HEAD~3
# 等价于
# $ git rebase -i HEAD^2
# 修改 commit
$ git commit --amend
$ git push -f
Git Tools Rewriting History
https://www.cnblogs.com/xgqfrms/p/16465388.html