Hacker News new | ask | show | jobs
by nikivi 2290 days ago
Is it possible given a git repo (hosted on say GitHub) to only 'clone' (download) certain files from it? Without `.git`
3 comments

I believe you're looking for the 'working tree' only. You could do the following:

git archive --remote=<your-URL> | tar -t

source: https://stackoverflow.com/questions/3946538

If you only want a subset of the repo's files, you can use Github's Subversion interface: https://stackoverflow.com/a/18194523
Short answer is, not easily: https://stackoverflow.com/a/14610427

You can get the most recent tree for a repository (no history, just the current state of the repo) with `git clone --depth=1`. That's often good enough for slow connections.