I was running a difference checker between my current files and a backup of the files on my external drive, and I found some differences between a git repo and it's backup. The only differences were some extra files under .git/objects on the left side and two blank .git/objects/info and .git/objects/pack folders on the right. I did a quick git show
and git log
on both sides, which gave identical outputs.
Then I did a git fsck --no-reflogs
, and found one extra dangling commit on the left side. Iteratively git ls-tree
ing my way down that extra commit gave me a bunch of trees and blobs that accounted for all but one of the extra files on the left side.
Using git cat-file -t <sha1>
on that one last file told me it was a tree. However, I have used git ls-tree
on every commit and still found no reference to this mysterious tree object. So where exactly did this file come from? I'm 99.99% sure it doesn't matter, just curious :P