There’s a huge binary commit I’d like to prune from my repo.
> git log --all -- '*.tiff'
commit 05f03aba18164c736182e612181f99ce04e38845
...
It’s not part of a branch…
> git branch --all --contains 05f03aba
> (nothing)
…, it’s not pointed to by a tag and it can’t be referenced by the reflog. (I’ve cleared it with git reflog expire --expire=now --all)
Yet the commit is somehow referenced and therefore not pruned:
> git fsck --unreachable
> (nothing)
How can I find out what causes the commit to be referenced?
If your commit is reached by
git log, you can just rungit log --sourceto show from where your commit was reached.It might be referenced by a backup of
git filter-branch– see this question for more detail: Remove refs/original/heads/master from git repo after filter-branch –tree-filter?