Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We use GitHub to host all my projects, and we've got a 6GB soft-limit. A few days ago, there were many files added to the repository which should not have been added (such as images, movies, etc.) which pushed the repository size to 2.4G:

$ du -sh .git
2,4G    .git

These changes were pushed to GitHub, but the Disk Usage there increased by almost 2 times the size of the .git folder. How is that possible? Am I missing something here? I always thought that the size of the repository was the same as the size of the .git folder.

share|improve this question
Have you tried git's garbage collection yet? – Marcin Apr 1 '11 at 1:43

This is because the objects on the server have not been deleted--they've just been orphaned. Unfortunately, running git gc --prune=now locally won't have any affect on the remote server. The good news is, the default prune age is two weeks, and GitHub runs this periodically. This means that any orphaned blobs/commits older than two weeks will be removed.

If you want the extra binaries removed immediately, you can go ahead and delete/recreate the repository on GitHub. Make sure you garbage collect locally before pushing to the new repository. Hope this helps!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.