12

I want to view the total repo size of a project hosted on GitHub without having to clone it. Sometimes I do this:

  1. Start cloning some GitHub repository

    Receiving objects: 45% (218/476), 5.50 MiB | 27 KiB/s

    Already drained 5MB? Suspend...

    ^Z
    
  2. Clone the repository on a server with a normal internet connection just to see its size.

  3. Continue (or abort) the local cloning.

How do I find out the repository size in advance? In the search I see repository size, but not in other places.

migrated from superuser.com Jan 26 '13 at 4:41

This question came from our site for computer enthusiasts and power users.

12

Using Github API:

$ echo https://github.com/hlamer/enki.git | perl -ne 'print $1 if m!([^/]+/[^/]+?)(?:\.git)?$!' | xargs -i curl -s -k https://api.github.com/repos/'{}' | grep size
"size": 284,
  • On mac, there's no -i parameter for xargs, so it's: $ echo https://github.com/hlamer/enki.git | perl -ne 'print $1 if m!([^/]+/[^/]+?)(?:\.git)?$!' | xargs -I{} curl -s -k https://api.github.com/repos/'{}' | grep size – Daniel Golden Aug 11 '15 at 20:25
  • and that is size in... kilobytes? – user2429920 Apr 7 '16 at 3:50
4

In Firefox you can use the GitHub Repository Size add-on.

github info bar

  • Why the downvote? Does the extension or userscript fails to work or contains malware? – Vi0 Jan 13 '18 at 19:12
  • No, everything works just fine... – vstepaniuk Jan 13 '18 at 23:51
2

Use Google Chrome browser and install this extension

Adds the repo size to the home page:

GitHub Repo Size extension screenshot

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.