Last Updated: February 25, 2016
·
508
· zigotica

clone remote Git repository with branches

If you git clone a remote repository that has branches it just creates the default branch by default. You will need to force the creation of a specific branch using:

git checkout -b test origin/test

which will clone the branch and checkout