switch to new remote branch git code example
Example: git checkout branch from remote to local
git checkout -b test origin/test
// making a local copy of the branch called "test" from origin.
git checkout -b test origin/test
// making a local copy of the branch called "test" from origin.