Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What causes this commit to still be referenced?

Tags:

git

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?

like image 974
Kay Sarraute Avatar asked Dec 16 '12 12:12

Kay Sarraute


1 Answers

If your commit is reached by git log, you can just run git log --source to 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?

like image 174
Chronial Avatar answered Sep 29 '22 01:09

Chronial