Skip to main content


You are in 'detached HEAD' state.
You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch.
in reply to fraggle

Oh this state drives me crazy when I'm coding; it's a valid state nothing wrong, but trying to get out of it...
in reply to Andrew Leer

@Andrew Leer @fraggle I'm under no illusion about git's usability, the error message is not awesome and neither are the commands to get into a named branch, but if you've been in this state more than once unwillingly, the way out is literally one checkout command, regardless if you want to name your current state and make it a branch or you want to discard it and switch to an existing branch.
⇧