So we had a user add and then remove a large directory of files in her workspace it two distinct commits. She then pushed her changes to the central repo and to the end user it looks like a noop. The problem is our central repo has jumped by 50x in size because of this. I have tried several things with filter branch and its just not working.
So the folder that was added was at the root level. The name of it was .core
I have tried the following filter-branch based on links:
http://dound.com/2009/04/git-forever-remove-files-or-folders-from-history/
Remove a directory permanently from git
The final commands I have tried looks like this:
git filter-branch -f --index-filter "git rm -rf --cached --ignore-unmatch .core" --prune-empty --tag-name-filter cat -- --all
rm -Rf .git/refs/original
rm -Rf .git/refs/logs
git reflog expire --expire=now --all && git gc --prune=now --aggressive
The resulting output says the Ref is unchanged. I have tried changing the reference of .core to various variations such as ./.core, *.core/*, ..... with nothing getting removed.
Thanks.