specific branch clone git

C++
git clone --single-branch --branch <branchname> <remote-repo>
git clone -b <branch> <remote_repo>
git clone -b my-branch [email protected]:user/myproject.gitgit clone --single-branch --branch <branch> <repository>

Source

Also in C++: