码迷,mamicode.com
首页 > 其他好文 > 详细

git clone

时间:2018-07-04 22:40:13      阅读:120      评论:0      收藏:0      [点我收藏+]

标签:ted   logs   sub   scm   create   this   mod   http   code   

 

官方文档:https://git-scm.com/docs/git-clone

1  --depth<depth>     

  Create a shallow clone with a history truncated to the specified number of commits. Implies --single-branch unless --no-single-branch is given to fetch the histories near the tips of all branches. If you want to clone submodules shallowly, also pass --shallow-submodules.

  只克隆最近的一次commit

 

2 -b <name>

  Instead of pointing the newly created HEAD to the branch pointed to by the cloned repository’s HEAD, point to <name> branch instead. In a non-bare repository, this is the branch that will be checked out.--branch can also take tags and detaches the HEAD at that commit in the resulting repository.

  clone时某个<name>分支而不是默认Origin HEAD(master)

  示例:https://www.cnblogs.com/nylcy/p/6569284.html

git clone

标签:ted   logs   sub   scm   create   this   mod   http   code   

原文地址:https://www.cnblogs.com/654321cc/p/9265480.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!