I have yet another example of doing a git rm -rf
without an initial commit. (I realized I had added lots of useless files and wanted to add some filters.)
Now I am left with 23000 dangling blobs with no tree, but with a complete Git history!
I'll use a script to loop over the blobnames (using git show 'blobname' > 'filename'
), but can I associate these filenames from the history to the blobs?
rm -rf
. You can still get it back, you need to find the root tree object. – Alex Browngit cat-file <blob>
to see what it contains for comparison. Also have a look at their date stamps in case that gives you a clue. – Philip Oakleygit cat-file
, but to compare with what? I only have the list of filenames. – PaulDjgit add
didn't create a local tree but waited till the commit for that, leaving details in the index. Unfortunately the 'git rm` clears all that from the index. I guess its time to triage the blobs into bin, ascii and utf8, to try to reduce the list size - 23,000 is a lot of crud. – Philip Oakley