Home > OS >  File not showing in git lfs ls-files in spite of showing up in objects to be committed
File not showing in git lfs ls-files in spite of showing up in objects to be committed

Time:12-02

I have cloned a repo with a bunch of files tracked with git lfs. I had updated the .gitattributes using git lfs track to include the file I was about to add. I have committed the .gitattributes, then added my new file.

When I try git lfs status I see my file in "Objects to be committed". However, when I type git lfs ls-files, the file is not there.

I have tried checking after committing the file, retrospectively adding it with migrate and some other combinations, all to no avail. The file does not appear to be tracked by LFS.

What am I missing? How to properly add a tarball to a repo to be tracked with lfs?

CodePudding user response:

...I did not do git lfs install before adding files to the tree.

You need to have git LFS installed (for ex. through downloading it from the official site), but also you need to run git lfs install in your repository to have LFS initialized there.

  • Related