Paul Paul - 4 months ago 11
Git Question

Download a remotes branch

When I execute

git branch -a
I have a lot of branchs in red who begin with
remotes/origin/...


How can I download it as a local branch ?

Thx

Answer

Do git fetch to download anything/everything regardless of branches. You already did that though, I guess.

Do git checkout remotes/origin/blabla to do a (headless) checkout of one of them, or git checkout blabla which will automatically create a local branch for the remote branch if you do not have blabla yet.