0

I'm a beginner of GitHub, as the following Image, I commit a project many times to GitHub in Android Studio.

Now I hope to revert the project to the time point "My Good", how can I operate? I can't any command button in Android Studio.

Image

enter image description here

HelloCW
  • 843
  • 22
  • 125
  • 310
  • 1
    Possible duplicate of [How do I checkout an old git commit in Android Studio?](https://stackoverflow.com/questions/36517118/how-do-i-checkout-an-old-git-commit-in-android-studio) – paulsm4 Feb 10 '19 at 07:18
  • Thanks! Your answer is OK, but I get the error "Detached HEAD" when I try to Push the project to GitHub after I have finished the Checkout Revision . You can see it at https://www.dropbox.com/s/g1nxz11x113pg5a/detached.png?dl=0 .why? – HelloCW Feb 10 '19 at 08:05
  • 1
    Sorry. My original suggestion just helped you get the "old" version. Now you *also* need to revert your *current* master to that old version. That's not "difficult": you need to do a [Git rebase](https://www.atlassian.com/git/tutorials/rewriting-history/git-rebase). These links might help: https://code.tutsplus.com/tutorials/working-with-git-in-android-studio--cms-30514, [How Can I Reconcile Detached Head With master/origin?](https://stackoverflow.com/questions/5772192/) or https://gyulajuhasz.com/blog/rebasing-in-android-studio/ – paulsm4 Feb 10 '19 at 18:50

0 Answers0