get a remote branch git
snippet in c

checkout remote branch

user3541

git fetch origin 

git checkout –track origin/xyz 

get a remote branch git

user9101

$ git checkout --track origin/newsletter
Branch newsletter set up to track remote branch newsletter from origin.
Switched to a new branch 'newsletter'