Sign up ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

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...

  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.

share|improve this question

migrated from Jan 26 '13 at 4:41

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

Check the answers to this Stack Overflow question. – Alex Jan 26 '13 at 8:22

1 Answer 1

up vote 7 down vote accepted

Using Github API:

$ echo | perl -ne 'print $1 if m!([^/]+/[^/]+?)(?:\.git)?$!' | xargs -i curl -s -k'{}' | grep size
"size": 284,
share|improve this answer
On mac, there's no -i parameter for xargs, so it's: $ echo | perl -ne 'print $1 if m!([^/]+/[^/]+?)(?:\.git)?$!' | xargs -I{} curl -s -k'{}' | grep size – Daniel Golden Aug 11 at 20:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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