Clone
复制
# 复制一个Repository
git clone git@git.intra.123u.com:RoMeta/serversrc.git # 通过SSH
git clone http://git.intra.123u.com/RoMeta/serversrc.git # 通过HTTP
git clone http://git.intra.123u.com/RoMeta/serversrc # 通过Url
git clone E:\Dev\serversrc # 通过Path
指定参数
# 指定分支
git clone --branch feat/format-name-convensions http://git.intra.123u.com/RoMeta/serversrc.git
git clone -b feat/format-name-convensions http://git.intra.123u.com/RoMeta/serversrc.git
E:\Dev\test\6>git clone -b feat/format-name-convensions http://git.intra.123u.com/RoMeta/serversrc.git
Cloning into 'serversrc'...
remote: Counting objects: 4367, done.
remote: Compressing objects: 100% (343/343), done.
remote: Total 4367 (delta 148), reused 172 (delta 74)
Receiving objects: 100% (4367/4367), 211.14 MiB | 28.39 MiB/s, done.
Resolving deltas: 100% (1931/1931), done.
Updating files: 100% (1070/1070), done.
E:\Dev\test\6>cd serversrc
E:\Dev\test\6\serversrc>git branch
* feat/format-name-convensions
# 指定深度
git clone --depth 1 http://git.intra.123u.com/RoMeta/serversrc.git