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?
I have pushed some bad code, and I am the only user of the repository. How can I rollback my last commit? |
|||||||||
migrated from programmers.stackexchange.com Jul 11 '11 at 18:58This question came from our site for professionals, academics, and students working within the systems development life cycle who care about creating, delivering, and maintaining software responsibly. marked as duplicate by Adam Lear♦, Felix Kling, manojlds, Paŭlo Ebermann, Ken Bloom Jul 12 '11 at 0:21This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question. |
|||||||||
|
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 |
|||||||||||||
|
First you need to determine the revision ID of the last known commit. You can use
|
|||||||||||||
|