gitlab clone branch

C++
git clone --single-branch --branch <branchname> <remote-repo>
git clone --single-branch --branch <branchname> <remote-repo>
Source

Also in C++: