git clone --depth=1 这就代表只拉取一层
帮助说明
git clone --help
#以下为截取输入,depth可以指定层数
--depth
Createashallowclonewithahistorytruncatedtothespecifiednumberofcommits.
Implies--single-branchunless--no-single-branchisgiventofetchthehistoriesnear
thetipsofallbranches.Ifyouwanttoclonesubmodulesshallowly,alsopass
--shallow-submodules.
评论