Check out a remote branch in git

If you would like to checkout the branch groups, you can simply say this in recent versions of Git:

git fetch origin
git checkout groups

This will automatically track origin/groups from a local branch groups.

In older Git versions you need to say this:

git fetch origin
git checkout --track origin/groups
Lexy Over 13 years ago