开发者

How do I checkout a single folder from git

How do I checkout just a single folder from git (e.g. th开发者_如何学JAVAe jsFiles folder over here)


You'll need a recent Git 1.7 install.

$ git --version
git version 1.7.0.4
$ git clone http://github.com/mongodb/mongo.git
$ cd mongo
$ git config core.sparsecheckout true
$ echo jstests >.git/info/sparse-checkout 
$ git read-tree -m -u HEAD
$ ls
jstests
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜