Instead of git clone, initialize a new local repository, add the remote origin, and then git fetch:
🖧🗫🤝 Collaboration tools 🛠⚒🚧 (git, forges, bug trackers 🔎🪲, gitea, gitlab)
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
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):
The fetch operation 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:
$ curl -sL https://api.github.com/repos/Marijnh/CodeMirror | jq -r .size
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) and git count-objects -vH after fetching gives about the same answer. Yet the repo is actually nearly double that size (~61 mb).