repo --single-branch code example
Example 1: git clone specific branch only
git clone -b mybranch --single-branch git://sub.domain.com/repo.git
Example 2: clone branch git
git clone <repository_url>
git branch -a
git checkout <branch_name>
git clone -b mybranch --single-branch git://sub.domain.com/repo.git
git clone <repository_url>
git branch -a
git checkout <branch_name>