This question already has an answer here:
- git: switch branch without detaching head 3 answers
I tried something like this:
git branch temp
to create a new branch but don't move the HEAD
. But I get:
# Not currently on any branch.
I don't want to merge anything, I just want a new branch at the current HEAD
.