Git revert local commit
If you feel sure about that and don't have any local uncommitted changes:
git reset --hard origin/master
where origin/master
is the branch you had pushed to.
The ref-log will still contain the reverted bits, until a garbage collect expires them. To revert the revert,
git reset --hard HEAD@{1}