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
本文介绍如何使用Git克隆远程仓库的指定分支到本地。通过使用`git clone -b`命令,可以轻松地将所需的分支从远程仓库拉取并设置为当前工作分支。
1499

被折叠的 条评论
为什么被折叠?



