This can occur when using composer to manage dependencies. From the dependency directory
git remote -v
will list origin as well as composer. The branch will appear as hash.
If the branch exists on the remote already you can run git fetch --all
before setting up the tracking.
I believe both of these acomplish the same thing
git checkout [branch] --track [remote]/[branch]
git checkout -b [branch] [remote]/[branch]