If you want to get master back into a stable state, say from a tag you know is deployed on production, you can do this:
git checkout master
git reset --hard <tag name>
git push --force origin master
http://stackoverflow.com/questions/6872223/git-revert-master-branch-to-a-tag