I have 2 branches, master
& feature
. Master occasionally receives small tweaks that are needed to go live quickly. Once these tweaks are done,
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 pick
ed onto your re-base point.