Clone a branch from a git repository

To clone a branch from a repository,

git clone <repo> -b <branch name> --single-branch

The –single-branch option will clone only the history leading to the tip of a single branch.

Advertisements