git clone 指定分支拉取代码
2024-08-20 22:59:14一. 不指定分支
git clone 资源仓库地址
比如:
git clone git@xxxxxx.git
二. 指定分支
git clone -b 分支名称 资源仓库地址
-b 中的 b 是 branch 的简写
比如:
git clone -b test git@xxxxxx.git
三. 指定分支拉,且重新命名项目名称
指定分支拉取代码,并重新命名项目名称,与资源仓库上的名称不一致
git clone -b 分支名称 资源仓库地址 项目名称
比如:
git clone -b uat git@xxxx/jr-common-system.git test
当前会从uat分支下载资源,并且本地项目名称不是jr-common-system,而是test