###Rolling back local and remote git repository
If nobody has pulled your remote repo yet, you can change your branch HEAD and force push it to said remote repo:
git reset --hard HEAD^
git push -f
###What if somebody has already pulled the repo?
Then I would suggest something that doesn't rewrite the history:
- git revert locally your last commit (creating a new commit that reverses what the previous commit did)
- push the 'revert' generated by git revert.
From stackoverflow