Search code examples
gitgit-lfs

Why is content of an LFS file showing LFS metadata?


I have two repos on two different machines cloned from the same source. I am inspecting the same branch on both the repos (exactly the same point as verified by the commit id). The repos have no modified or staged files. When I try to see the content of an LFS file (a large xml file) on one repo (using cat command), it prints out the actual content as expected. However, when I try to see the content of the same file on the other repo, I do not see the actual content but something that seems to be metadata related to LFS. It is something as shown below.

version https://git-lfs.github.com/spec/v1
oid sha256:2dd0f67526c5ab79af5ae8755a69ffa516519f277b68460efd3a02b6550ca3be
size 7625898

So, I am totally confused. If I try to copy the actual big file from the first repo to the second, checking status of the second repo shows that the file has been modified. What could be the issue here and how can I resolve it?


Solution

  • It sounds like LFS is not configured correctly on the repo that's showing the metadata. IIRC it was originally necessary (and may still be necessary) to run git lfs install locally in each repo (even if the repo was a clone of an already-set-up LFS-supported repo).