So I pulled a large number of files using git once (massive).
But then I used git rm to remove the directory from the git database because git started taking a long time to pull from origin, but calling git rm did not solve the problem – git still takes a long time to pull from origin.
What can I do other than recreating the repository to fix this problem?
Because git keeps a history of all your commits, that content is technically there in the git repo (which, thankfully is exactly what a source repo is good for 🙂
You can rewrite the past history to remove all references to the folder.
This site has an example using
filter-branch:http://dalibornasevic.com/posts/2-permanently-remove-files-and-folders-from-a-git-repository
Note: You are rewriting history, you will need to force push the repo to the server. If other people are using/committing to it, it may cause them some trouble.
Edit: Another interesting read on the topic: http://ramblinglabs.com/blog/2012/04/git-removing-sensitive-data-and-rewriting-history