git clone specific version

C++
git clone -b <branch> <remote_repo>#For cloning a specific version of a repo branch find the SHA1 ID and use
#following commands instruction
git clone $URL
cd $PROJECT_NAME
git reset --hard $SHA1
git pull
Source

Also in C++: