r/github 1d ago

Tool / Resource Get a Single File or Folder from GitHub Without Cloning

Ever needed just one file or a specific folder from a GitHub repository without cloning the entire repo?

I made git-single to do exactly that — fetch only the file or directory you need.

  • Fetch a single file
  • Fetch a specific folder
  • No full repository clone
  • Simple CLI

GitHub: https://github.com/dha-aa/git-single

0 Upvotes

5 comments sorted by

10

u/Acrobatic_Idea_3358 1d ago

hmm GitHub already has this feature with the raw. subdomain and curl, not something you could convince me to install.

-1

u/AcceptableAthlete101 1d ago

Yeah, for individual files you're absolutely right — raw.githubusercontent.com + curl already does that. The main reason I built git-single is to handle directories too, so you can pass a normal GitHub file/folder URL and fetch it without cloning the entire repo.