git supprimer deux engins mais pas le code

IF you have NOT pushed your changes to remote
git reset HEAD~1
ELSE you have pushed your changes to remote
git revert HEAD
uzii