Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have, over the course of the last few days, removed several hundred megs of large text and binary files from a git repository that I had set up recently (I am relatively new to git).

I did this in order to reduce the amount of time it takes to clone this repository on a remote machine.

However, the repo itself is still huge, and it still takes forever to clone. I suspect that git is keeping some manifestation of the large files in order to maintain some history.

How might I remove these objects, to make my repository "lean and mean"?

Thanks!

share|improve this question
    
Similar question here –  Sean Reifschneider Nov 14 '10 at 23:01

2 Answers 2

up vote 5 down vote accepted

You need to remove the history that contains those large files. See this blog post on the subject.

share|improve this answer

Please try following command.


git gc --aggressive

share|improve this answer

Your Answer

 
discard

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.