14d (edited) • Lessons
Checking your gits < GitHub Limit
**EDIT:** Seems the old 500mb total was an old limitation which no longer applies. Copilot says this:
Short answer: there is no “500 MB total across all repos” meter in GitHub settings for normal Git repos.
  • The 500 MB number is usually confusion with "old guidance/soft limits".
  • GitHub repo limits are mostly per-repo guidance (not one total account cap for all repos).
  • What is metered in billing: Git LFS, Actions artifact storage/minutes, packages, etc.
Useful links:
But rather than deleting this post I figured I'll leave it here for future reference.
--------------------------------------------------------------
So while GitHub is essentially free, if you've been using it for a number of years, you might want to know how close to the limit you are. Yes there is limits. 500mb to be exact. I was wondering considering how much I've been using it over the last couple years if I was about to go over that limit. But there's nothing in GitHub settings, I searched for ages... Time for a bash command.
So I know I have 2 personal folders I use for my repos. 1_myprojects and 2_myskills. so I just need to recursively count each (I don't run mono repo)
The following command will also work for mono repo. Just run it in the folder above your monorepo.
```bash
find . -name ".git" -type d -exec du -ch {} + | grep total$
```
```powershell
(Get-ChildItem -Path . -Filter .git -Recurse -Hidden | Get-ChildItem -Recurse | Measure-Object -Property Length -Sum).Sum / 1MB
```
My total comes to 311mb. I think, that powershell command output is a little funky.
EDIT:- THIS IS THE BEST COMMAND TO RUN:
**Total**
```
gh repo list "$(gh api user -q .login)" --limit 1000 --json diskUsage --jq '[.[].diskUsage] | add as $kb | "Total: \($kb) KB | \($kb/1024) MB | \($kb/1024/1024) GB"'
```
**Private Repo's Count**
```
gh repo list "$(gh api user -q .login)" --visibility private --limit 1000 --json diskUsage --jq '[.[].diskUsage] | add as $kb | "Private total: \($kb) KB | \($kb/1024) MB | \($kb/1024/1024) GB"'
```
3
3 comments
Garratt Campton
4
Checking your gits < GitHub Limit
CC Strategic AI
skool.com/cc-strategic-ai
What $500K of custom software looks like when you build it yourself with Claude Code. Free toolkit on my site. Premium unlocks the full stack.
Leaderboard (30-day)
Powered by