this post was submitted on 07 Jan 2026
6 points (100.0% liked)

codeberg

196 readers
2 users here now

Codeberg is a community-driven, non-profit software development platform operated by Codeberg e.V. and centered around Codeberg.org, a Gitea-based software forge.

founded 11 months ago
 

I have a repo that I've just uploaded to codeberg. In earlier versions, I had a ton of media files - they have now been removed. However, when I uploaded the repo to codeberg, I'm getting this notification:

Your private repo uses up a large amount of disk storage, while all content should ideally be public and licensed under an OSI- or FSF-approved Free Software licence. Please refer to our ToS and the FAQ about software licenses and private repositories. Thank you for considering to release this repo to the public or reducing your required disk space for this repo.

Turns out, my pushed files are 1 MB, but the .git folder is 279 MB - how do I slim it down?

you are viewing a single comment's thread
view the rest of the comments
[โ€“] CameronDev@programming.dev 5 points 4 weeks ago (4 children)

Rewrite history. Use git rebase to squash all commits between adding and removing the blobs. Its gross, and if your project is publically used you need to tell everyone what your doing and why.

[โ€“] oz1sej@lemmy.world 7 points 4 weeks ago (3 children)

Rebase shrunk the .git folder from 280 MB to 267 MB... So in the end, I just deleted the repo AND my local .git folder, created a new repo and uploaded. Now it's 1,5 MB ๐Ÿ˜ Thanks!

[โ€“] theit8514@lemmy.world 8 points 4 weeks ago

For the future, git is highly resilient so squashing the commits still leaves all the data in the reflog. After you do that operation a git gc would be needed to remove any unreferenced commits and shrink the git folder.

load more comments (2 replies)
load more comments (2 replies)