On a local repo, I\'ve just executed git cherry-pick SHA without any conflicts or problems. I then realized I didn\'t want to do what I just did. I have not pushed
git cherry-pick SHA
One command and does not use the destructive git reset command:
git reset
GIT_SEQUENCE_EDITOR="sed -i 's/pick/d/'" git rebase -i HEAD~ --autostash
It simply drops the commit, putting you back exactly in the state before the cherry-pick even if you had local changes.