Skip to content
Go back

clone

Edit page

clone

参数以及用法

常用用法

git clone --depth 1 https://github.com/aaa.git
git clone https://github.com/aaa.git --progress --verbose
# 如果是使用 tag 来区分版本可以这样 clone
# 他会新建一个 branch ,目的是为了防止游离的 HEAD
git clone --branch v0.35.3 https://github.com/nvm-sh/nvm.git
# 如果是使用 branch 来区分版本可以这样 clone ,他只会拉取那个分支的代码
git clone -b release-2.2 https://github.com/hyperledger/fabric.git
# 也可以直接 clone 整个项目然后通过 checkout -b 来切换版本分支
git clone https://github.com/example.git
git checkout -b release-2.2
git branch -a # 查看分支所在的版本

Edit page
Share this post on:

Previous Post
docker 简介
Next Post
git clone 命令