github: clone a specific branch

奚卓
2023-12-01

Git clone will behave copying remote current working branch into local.

if you want to clone a specific branch,there is another method:

git clone -b <branch> <remote_repo>

Example:

git clone -b my-branch git@github.com:user/myproject.git

Alternative (no public key setup needed):

git clone -b my-branch https://git@github.com/username/myproject.git

 类似资料:

相关阅读

相关文章

相关问答