I am trying to get a remote branch and track it but when I do:
git checkout remotes/mybranch
When I do git branch -a it displays remotes/mybranch in the red color? I get an error:
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 performing another checkout.
How can I checkout to this mybranch locally and track it? How can I avoid the detached HEAD state?