Removing a commit is very easy, but it is better to save it somewhere maybe there is some code line which would be useful. (I write this because something similar had happen to me some days ago).
So best is to start with some
git reset --soft HEAD~N
with N for the commits to go back and than some
git stash push -m "some useful comment"
to save a patch for further use. Than your are the N commits back.