I use the IntelliJ Git Integration plugin. I operate in multiple-repository mode and normally things work fine.
When I tell Git to check out a branch name by typing it instead of picking it from the multi-repo/branch UI, it's appending ^0 to the branch name resulting in a console message that I am checking out in Detached Head state. I am more familiar with what 'detached head' means than with the caret "^" syntax so I'm not 100% sure how accurate the message is.
Nonetheless, Does anyone know why this is happening? Why has it chosen to checkout mybranch^0 instead of just mybranch?
(From Git UI in lower right, select repo, choose 'Checkout tag or revision', type branch name instead of selecting it from the UI list of branches)
"Console" display in IntelliJ:
09:50:54.244: [reponame] git -c core.quotepath=false -c log.showSignature=false checkout feature/branchName^0 --
Git bash shows detached head state rather than being on the branch:
user@WORKSTATION MINGW64 /c/dev/intellij projects/repo-name ((b72ad203...))
There is no action to checkout a branch by typing in IntelliJ. There is action called Checkout Tag or Revision, it is intended to checkout to detached state. See the Dan's answer, and https://youtrack.jetbrains.com/issue/IDEA-181686
To checkout a branch in IntelliJ, use the Checkout action from the corresponding branch's action list. Branches popup supports speedsearch, so you could do that without a mouse:
Ctrl+Shift+[Backquote]
on Win, check in KeymapEnter
to open actions list Enter
to execute