Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LFS upload missing object but the file is there

I am trying to push a commit. But I keep getting an error saying:

error: GH008: Your push referenced at least 1 unknown Git LFS object

The file it is questioning is:

 (missing) SRP/com.unity.shadergraph/.data/texture_2d_lod_node.PNG (b262d71d68d478f6b6c3dc3086451a764e065b8608a65104e17cb8aefefa5f76)

Now I went to the folder and that file does exist:

Screenshot of folder/file

So my question is why does it keep giving me this error?

like image 395
Marc Rasmussen Avatar asked Jan 20 '26 04:01

Marc Rasmussen


2 Answers

This could happen you are migrating from one remote repository to another. Assuming the old repository is named old-origin,

git lfs fetch --all old-origin
git lfs push --all origin

should synchronize all LFS objects in your git commit history.

like image 87
jadelord Avatar answered Jan 22 '26 16:01

jadelord


It looks like the object is somehow missing from the LFS object store. LFS objects are located at .git/lfs/objects. If your missing object was there it would be located at a path like b2/62/d71d68...

git-lfs adds objects when it runs the clean filter before staging files. Assuming the missing object is for the latest revision of the file, you can force the clean filter to rerun with a command like the following:

git add --renormalize path/to/file
like image 23
Jason Haslam Avatar answered Jan 22 '26 18:01

Jason Haslam



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!