How to checkout a single file or subtree from a git repository

Viewed 27

Since source code repositories are databases it should be possible to get information out of them easily. The question is, what is the best way to extract a single file or sub-tree from a Git repository as a plain detached thing (file or sub-directory).

Perhaps something like this?

git extract --path /path/to/thing  path/to/repository
0 Answers
Related