In accordance with the documentation
git checkout -b test --track origin/develop
gotta do the trick.
As additional goodies, if you want to create a local branch to track the remote branch of the same name, you can be lazy to omit the -b option
git checkout --track origin/develop
will create and verify a local branch named develop , which is equivalent
git checkout -b develop --track origin/develop
From document
As a convenience, --track without -b means creating a branch.
[...]
If the -b option is not specified, the name of the new branch will be removed from the remote tracking branch.
source share