Git: git rebase提交到某一特定的提交

①git rebase <指定commit的前一个commit> --interactive 

②将需要改动的commit前面的pick 改为 edit,然后保存退出

③更改文件

④git add <更改的文件>

⑤git commit --amend

⑥git rebase --continue

这里如果有冲突, 需要先解决冲突:

* 编辑冲突文件, 解决冲突

* git add .

* git commit --amend

* 解决冲突之后再执行git rebase --continue

扫描二维码关注公众号,回复: 14768686 查看本文章

猜你喜欢

转载自blog.csdn.net/qq_34341546/article/details/129308332
今日推荐