Discard the latest commits with the following command:
git reset --hard HEAD~1
git reset --soft HEAD~1