If you didn't publish changes, to remove latest commit, you can do
$ git reset --hard HEAD^
(note that this would also remove all uncommitted changes; use with care).
If you already published to-be-deleted commit, use git revert
$ git revert HEAD
If you didn't publish changes, to remove latest commit, you can do
$ git reset --hard HEAD^
(note that this would also remove all uncommitted changes; use with care).
If you already published to-be-deleted commit, use git revert
$ git revert HEAD