Possible Duplicates:
Undoing a ‘git push’
I have pushed some bad code, and I am the only user of the repository. How can I rollback my last commit?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Since you are the only user:
( basically, go back one commit, force push to the repo, then go back again – remove the last step if you don’t care about the commit )
Without doing any changes to your local repo, you can also do something like:
Generally, in published repos, it is safer to do
git revertand thengit push