Skip to content

Instantly share code, notes, and snippets.

@YimianDai
Last active July 30, 2019 23:08
Show Gist options
  • Save YimianDai/e2db953b2799173752d38f525ccac322 to your computer and use it in GitHub Desktop.
Save YimianDai/e2db953b2799173752d38f525ccac322 to your computer and use it in GitHub Desktop.
Notes on Git / GitHub

https://gist.github.com/YimianDai/7dcf6340fc435323a328634df0666f5e

查看 Github repo 的大小

$ curl -u "{:username}" https://api.github.com/repos/{:organization}/{:repository}

把花括号内的包括花括号替换成相应的内容即可,比如我的 curl -u "yimiandai" https://api.github.com/repos/yimiandai/images 没有 {:organization} 就跳过,在输出的最后倒数 30 行附近,有一个 size,后面的数字就是这个 repo 的大小,单位是 KB。

在终端中直接看到

`$ curl -u "{:username}" https://api.github.com/repos/{:organization}/{:repository} | grep size`

中间会跳出来让你输入 github 的密码

参考自 See the size of a github repo before cloning it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment