git new branch from origin code example
Example 1: create new branch from origin
git checkout -b nameOfBranch origin/nameOfBranch
Example 2: git checkout to remote branch
$ git checkout --track origin/newsletter
Branch newsletter set up to track remote branch newsletter from origin.
Switched to a new branch 'newsletter'
Example 3: git checkout remote branch
git checkout --track origin/<branchname>