1

I am using TFS plugin in android studio. my last commit was buggy an I want to get back to last well commit. I go to version control and select Checkout Revision and that put me in Detach head state. I do not know about git command line and only work with TFS plugin. How can I get ride of this?

faeze saghafi
  • 650
  • 10
  • 25
  • do u have any code to commit? if not do a hard reset `git reset --origin/yourBranchName` – Anmol Dec 24 '18 at 09:35
  • Possible duplicate of [Fix a Git detached head?](https://stackoverflow.com/questions/10228760/fix-a-git-detached-head) – Michael Dodd Dec 24 '18 at 10:48
  • Try the command `git update-ref refs/heads/ HEAD`. Replace "" with the real branch name. In your case you needed `git reset --hard` instead of `git checkout `. I'm not familiar with Android Studio, but I'm sure you can find the corresponding menu items and checkboxes to do the hard reset. – ElpieKay Dec 24 '18 at 11:26
  • @Anmol is there any change in GIT master or other branches in stash for these command? or its only affect locally in my android studio. – Chetan Joshi Feb 13 '19 at 09:12

0 Answers0