user339108
user339108

Reputation: 13131

How do I checkout a single folder from git

How do I checkout just a single folder from git (e.g. the jsFiles folder over here)

Upvotes: 4

Views: 460

Answers (1)

Catherine
Catherine

Reputation: 23071

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

Upvotes: 2

Related Questions