git clone only selected branches code example Example: git clone specific branch only git clone -b mybranch --single-branch git://sub.domain.com/repo.git