I have the following history in git
A-B-C-D-E-F I want to rollback the changes that I did in commit E, but wanted the changes that I in commit F. So I did a git rebase like this
git rebase -i D and picked only commit F and ignored commit E. My history now looks like
A-B-C-D-F But, what I want to do is, rollback the changes done in commit E, but still maintain in history that E was added and then removed. Something like this
A-B-C-D-E-F-E1 Where E1 is a commit which reverts the changes done by commit E.
How to do it in git?