pull new branch git code example
Example 1: git checkout branch from remote to local
git checkout -b test origin/test
// making a local copy of the branch called "test" from origin.
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: how a to pull a branch in git
$ git pull origin other-branch
Example 4: git pull new branch from remote
git fetch origin
git switch daves_branch