News for hackers. Stuff that matters.
Re:Git clone any sub-directories/parts of a GitHub repo by xsmasher on Friday February 26, 2021 @06:18PM (#26281002)
Excuse my ignorance.

The advantage of this tool over 'git clone --depth 1' is that this tool can clone just specific files?

Re:Git clone any sub-directories/parts of a GitHub repo by robin21 on Saturday February 27, 2021 @03:33AM (#26283512)
A motivational section in readme would be useful.

I can imagine that it’s mostly for convenience.

I can think of use cases including:

- downloading a single package from a monorepo

- being able to copy paste a url from GitHub for the directory you are currently viewing

Re:Git clone any sub-directories/parts of a GitHub repo by habibr on Saturday February 27, 2021 @11:49AM (#26286026)
Thanks for the suggestion, added :)

Yeah as you've said, I often find myself wanting to only download a certain directory, path or package of an especially big repo that I'm currently viewing (without even cloning the entire repo at depth 1) and to do so by simply copy & pasting the GitHub URL so that's why. Probably more instances where this might come in handy ;)

Re:Git clone any sub-directories/parts of a GitHub repo by sigmonsays on Friday February 26, 2021 @06:28PM (#26281073)
can i see a performance comparison here with total times? Why not just git clone --depth 1?

With github API rate limiting it seems ridiculous to expect it to be faster than a basic shallow git clone.

Re:Git clone any sub-directories/parts of a GitHub repo by soylentgraham on Friday February 26, 2021 @06:20PM (#26281019)
I still wish git could submodule to a specific directory in the sub-repository!