View estimated size of GitHub repository before cloning

by Vi0   Last Updated January 13, 2018 14:03 PM

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.

Tags : github


Answers 3


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,
Vi0
Vi0
January 27, 2013 17:49 PM

Use Google Chrome browser and install this extension

Adds the repo size to the home page:

GitHub Repo Size extension screenshot

Bigwave
Bigwave
February 07, 2017 15:33 PM

You can use this add-on for Firefox.

enter image description here

Stepaniuk
Stepaniuk
January 13, 2018 13:53 PM

Related Questions





Opening pdf in a browser with Github Page

Updated June 11, 2015 23:01 PM