“`
$ git config core.sparsecheckout true
简单解释一下:
Git1.7.0以后加入了Sparse Checkout模式,这使得Check Out指定文件或者文件夹成为可能。
告诉Git哪些文件或者文件夹是你真正想Check Out的
(你可以将它们作为一个列表保存在 .git/info/sparse-checkout 文件中。)
例如:
echolibs>>.git/info/sparse−checkout
e
c
h
o
l
i
b
s
>>
.
g
i
t
/
i
n
f
o
/
s
p
a
r
s
e
−
c
h
e
c
k
o
u
t
echo apps/register.go >> .git/info/sparse-checkout
$ echo resource/css >> .git/info/sparse-checkout
我的操作:$ echo hotfix_android_demo >> .git/info/sparse-checkout
还记得我开头说要下载阿里sophix的demo吗
最后一步,拉取想要的分支
$ git pull origin master