I am facing a very strange issue which I had never faced in the past .
I moved lots of images and pdfs and other documents to my project git repository the repository size was increased to 290 MB
Later realized and moved all those stuff to an amazon s3 server and deleted them from repo since I don't need to keep there versions .
Now my code base size has decreased to 8 MB . I continued my work with the codebase by doing new commits .
I recently wants to move them to new server . I now realized that the size of my repository when I new ly clone is more than 230 MB .
After clone If I check the .git folder its size was 200 MB .
This clearly shows that I deleted those images long back and committed to the repo but its still there in the history .
How can I solve this issue .
The issue is how to remove things which we don't need permanently from git repository . As in my case I have already done lot of changes to codebase after deleting those binary stuff, but still the things exists in history .
may be I might have done
git rm *.something &&
git rm --cached filenames
But I just manually deleted them from the repo and did a git commit and pushed to remote repository which was a blunder how can I solve this strange problem ? .
Is there a way so that I could reduce the size of my .git folder
Please suggest ,
Thanks in advance