Skip to content

Instantly share code, notes, and snippets.

@sainak
Forked from dingzeyuli/check_github_repo_size
Last active October 14, 2020 06:11
Show Gist options
  • Save sainak/8b6ddd5fb1c0c8adb0f759998d16f354 to your computer and use it in GitHub Desktop.
Save sainak/8b6ddd5fb1c0c8adb0f759998d16f354 to your computer and use it in GitHub Desktop.
Check the size of a github repo before downloading
# http://webapps.stackexchange.com/questions/39587/view-estimated-size-of-github-repository-before-cloning
curl -s https://api.github.com/repos/torvalds/linux | jq '.size' | numfmt --to=iec --from-unit=1024
# output:
# "size": 1746294,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment