git clone -b <remote_repo> Example:
git clone -b my-branch git@github.com:user/project.git Alternative (no public key setup needed):
git clone -b my-branch https://git@github.com/smagic39/myproject.git With Git 1.7.10 and later, add --single-branch to prevent fetching of all branches. Example, with OpenCV 2.4 branch:
git clone -b 2.4 --single-branch https://github.com/smagic39/project.git opencv-2.4