Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah, it basically has to advertise everything it has, so if you have a lot of references, it can be a quite large exchange before anything is done.



You can see basically what part of the communication is by running `git ls-remote` and see how big it is.


Indeed, `git ls-remote` produces 14MB output; interestingly, 12MB of it are `refs/pull/<n>/head` as it lists all PRs (including closed ones), and the repo has had ~200,000 PRs already.

It seems like large GitHub repos get an ever-growing penalty for GitHub exposing `refs/pull/...` refs then, which is not great.

I will do some further digging and perhaps reach out to GitHub support. That's been very helpful, thanks Scott!


Have you switched already to the "new" git protocol version 2? [1]

> An immediate benefit of the new protocol is that it enables reference filtering on the server-side, this can reduce the number of bytes required to fulfill operations like git fetch on large repositories.

[1] https://github.blog/changelog/2018-11-08-git-protocol-v2-sup...




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: