Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 2
    HEAD in a local repository does not always refer to a branch, it more specifically refers to the currently checked-out branch. You can enter a detached HEAD state where HEAD no longer refers to any branch. Commented Jun 12, 2014 at 5:10
  • Correct. I didn't mention that because it's not that common and the OP's question suggested her lack of experience with git. Commented Jun 12, 2014 at 5:45
  • It's funny though, even the documentation itself says that HEAD refers to the current branch. The documentation is wrong :/. Commented Jun 12, 2014 at 5:50
  • That is in some ways true. Even in a detached head state, you are somewhere and that can be referred to as a head (which is what git says for branch) but yeah, you're right. Send them a pull request? Commented Jun 12, 2014 at 6:19