Git: clone a specific branch

Git: clone a specific branch

 

git clone -b <branch> <remote_repo>

Example:

git clone -b my-branch [email protected]:user/myproject.git

Alternative (no public key setup needed):

git clone -b my-branch https://[email protected]/username/myproject.git

你可能感兴趣的:(git)