There is a remote branch “development” for one of my packages on github.
However, asking SM to check out that branch doesn’t work (as expected, or perhaps at all).
I type in the branch name, hit return, and nothing happens whatsoever.
What’s up with that?
SM and Branches
When I use command-line git to checkout that branch, it shows up in SM. Then I can pick it from the dropdown list.
What do you do exactly? As in, which command do you run and how do you run it.
I clone the package. It comes out as “master”. Then I want to switch to “development”, so I go to Repository/Check Out Branch. I type in “development” (without the quotes) and hit return. Nothing happens: no reaction from the GUI.
Try “Checkout Remote Branch” instead (or “Create Branch From Remote Branch”, if you want a local branch from it).
But that did git checkout refs/remotes/origin/development
instead of git checkout development
? Is that okay?
Yes, because after cloning the development
branch doesn’t exist yet for you locally. I think git automatically infers from git checkout development
that you want the remote development
, which is refs/remotes/origin/development
and does that automatically.
When you checkout without creating a branch (which “Create Branch From Remote Branch” would do), you are in detached HEAD state. I wasn’t able to fin a satisfactory explanation of this with a quick search, but for the time being this will do.