两种方式:1.指定clone某个分支 git clone -b <branch_name> <repo_name> 例如: git clone -b my-branch git@github.com:user/myproject.git 2.clone下仓库,切换到自己需要的分支 git clone git@github.com:user/myproject.git 列出所有的分支,找到自己要的分支名称 git branch -a 切换到需要的分支 git checkout <branch_name>
两种方式:
1.指定clone某个分支
2.clone下仓库,切换到自己需要的分支