天天看点

git 从远程仓库指定分支clone代码到本地不指定分支指定分支

不指定分支

git clone  + clone 地址

# 例如
git clone https://amc-msra.visualstudio.com/xxx/_xx/xxxxxx

           

指定分支

git clone -b + 要clone的分支名 + 仓库地址

# 例如
git clone -b  develop https://github.com/7ommykk/kk.163hot.git

           

注:

不要只停留在 从 GitHub 上clone,道理基本是相通的,在其他代码仓库上也可这么操作

继续阅读