Checking Out a Remote Branch with Git
After cloning a git repository, you may want to work on a branch from the origin repository. You cannot create a branch in the normal manner. Instead, you need to create a branch based on the remote branch that is set up to track the branch from the remote. It is simple to do, but easy to forget.
git checkout -b test origin/test
References: