0

I've tried to do a filter-branch like this to get rid of some large files:

git filter-branch --prune-empty --index-filter "git rm --cached -f --ignore-unmatch largedir*" --tag-name-filter cat -- --all

However, I see that the large objects are still in my repository in the 'objects' directory, even after a new clone. Is there a way to find out why these objects are still required according to git?

Corno
  • 5,448
  • 4
  • 25
  • 41
  • 1
    Remember that `filter-branch` *keeps all the old commits* under the `refs/original/` name-space (while making all-new commits and putting those in the ordinary `refs/heads/` name-space). You must remove those, clean out reflogs, and `gc` to actually shrink the repository. Also if you have tags you must make sure they get updated. Though if you're cloning, the `refs/original/` name-space is not normally copied (and reflogs are never copied), but tags are. (If you clone with `--mirror` all refs are copied!) – torek Nov 12 '13 at 12:17
  • Also, check out http://stackoverflow.com/q/460331/1256452 -- find a large object's hash and use the above answer to see where it's referenced. – torek Nov 12 '13 at 12:31

0 Answers0