Remove duplicate commits introduced after bad rebase(s)

和自甴很熟 提交于 2019-12-05 04:00:44

To remove the duplicate commits you must go through the list generated by git rebase master -i and drop the duplicates by navigating up and down the list using the arrow keys pressing d on the commits you want to drop.

(master can be replaced with a commmit hash or any valid re-base point)

Once you have deleted all the duplicates and have a commit list that looks how you expect the history to look, exit the rebase screen by pressing esc and typing !wq and pressing enter.

The re-base will then continue and apply the list of commits you picked onto your re-base point.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!