HEAD Detached at origin/master

Asked

Viewed 1,738 times

2

I started studying a little while ago, Git, and I was creating a branch, but I ended up creating more branch than I wanted. So, I was deleting the branch that I didn’t want with the command line:

To delete the branch locally: git branch -D <nome do branch>

I erased all remaining only the master, but the following appeared branch HEAD detached at origin/master

Can someone help me tell me what I should do, or rather what I did wrong?!

  • Do you have the command history? Apparently it was a checkout gone wrong...

  • Utilize git branch and make sure you’re on master, if you are not using git checkout master

  • I had created a branch outside the folder that was supposed to be created. By and was giving git checkout master inside the folder! It would never happen! Thanks, guys for the contribution.

1 answer

1

You’re probably not in branch master, that should solve your problem:

git checkout master

Browser other questions tagged

You are not signed in. Login or sign up in order to post.