this post was submitted on 02 Aug 2026
1 points (100.0% liked)
🖧🗫🤝 Collaboration tools 🛠⚒🚧 (git, forges, bug trackers 🔎🪲, gitea, gitlab)
132 readers
1 users here now
This is going to generally be about git forges like gitea, but it’s open to discussion about any collaboration assisting tools and platforms.
Related communities: !librecomms@scribe.disroot.org
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Instead of git clone, initialize a new local repository, add the remote origin, and then
git fetch:https://stackoverflow.com/questions/2882620/is-it-possible-to-remote-count-object-and-size-of-git-repository
Thanks! That link is jailed in Cloudflare’s walled garden but this variant is reachable to everyone (in case someone else wants to follow this):
https://overflow.ocus.top/questions/2882620/is-it-possible-to-remote-count-object-and-size-of-git-repository
The
fetchoperation does not disclose the total before fetching, but it gives a way to monitor progress which is good enough in some situations. I wonder if the percentage can be trusted. If the percentage is accurate, then it must also know the total. But the ratio is not apparently based on size.Further down in your same article, there is a Github-specific way to get the size, which I tweaked to:
Perhaps the best generic answer (independent of Github) is further down the same page. This comment gives a codified way of doing what I was contemplating.
I appreciate the helpful link. Though I’m seeing a huge discrepency. E.g., for this repo, curl gives
34785(which is apparently in kilobytes) andgit count-objects -vHafter fetching gives about the same answer. Yet the repo is actually nearly double that size (~61 mb).