1

I want to download specific folder from GitHub, and not the whole package.
But this one folder is also huge, that's why someone recommended me a token method, but I actually don't know what is it and how it works, and I also did not found the helpful information about this method in Internet.

So maybe someone can explain me, how can I download this folder with the token-method?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250

1 Answers1

0

First, the token can be the PAT (Personal Access Token), in order to authenticate you, avoiding any anonymous access, and allowing a greater number of queries.

Second, "Download a single folder or directory from a GitHub repo" refers to one of the most active tools: refined-github/refined-github.

That Chrome extension will add a download button on all folders:

https://user-images.githubusercontent.com/1402241/35044451-fd3e2326-fbc2-11e7-82e1-61ec7bee612b.png

And you will enter your token in the options of this extension.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Hey, first of all thank you for your answer. Actually I tried also this method, but unfortunately it doesn't help me. The folder wasn't downloaded. I suggest the dataset is too huge for this extension. Do you know maybe another program or method which could help me? –  Dec 20 '21 at 22:06
  • @Kathi With a recent 2.34 Git, you have: https://github.blog/2021-11-10-make-your-monorepo-feel-small-with-gits-sparse-index/ That could help cloning just the part you need from this giant repository. Example at the beginning of https://stackoverflow.com/a/59515426/6309 – VonC Dec 20 '21 at 23:14
  • I tried to execute this terminal command, but get too many arguments from the terminal. My goal is to download the tweets from this repository from January and I tried this command:git clone --filter=blob:none --no-checkout https://github.com/lopezbec/COVID19_Tweets_Dataset/tree/main/Summary_Details/2021_01cd git I am just a beginner, and maybe I did something wrong? –  Dec 21 '21 at 12:33
  • @Kathi When you clone, you clone a repository as a all, not a tree/subfolder: `git clone --filter=blob:none --no-checkout https://github.com/lopezbec/COVID19_Tweets_Dataset` – VonC Dec 21 '21 at 12:44