3

I am a bit confused. I back up a project with Github.com. Because my files are too large to store them on Github.com, I am using git large file storage. Now I changed to a new computer, and performed a git clone on the repository stored remotly on Github.com. I also installed git lfs with brew and did a git lfs install in the just cloned repository. However, my large files are still "pointer files". When I run my project,it says, these files are missing.

I did a

git lfs fetch --all

which downloaded something. But where is it? How do I retrieve the files I backed up with git lfs after moving to a completly new computer with a fresh setup?

four-eyes
  • 10,740
  • 29
  • 111
  • 220
  • Depending on your Git and Git-LFS versions, you might want to use `git lfs clone`, which sets everything up. See also https://stackoverflow.com/q/48392440/1256452 (which goes into some detail about exactly what is different, which versions of Git and Git-LFS talk with each other, etc). – torek Jul 01 '22 at 16:05
  • In your particular case, you probably have modern versions of everything and don't need to use `git lfs clone`—but you installed Git and Git-LFS in the "wrong order" such that the clone had already happened before you got Git-LFS installed. By running `git lfs clone` you would have seen that Git-LFS had not yet been installed. Of course `git lfs clone` is now deprecated, which is ... kind of annoying, really. Well, so it goes. – torek Jul 01 '22 at 16:10

1 Answers1

6

Run the following commands:

# Fetch all the LFS files from the remote
git lfs fetch

# Replace the pointer files to the actual files
git lfs checkout

Now you should see that the pointer files are replaced by the original files.

Raphael Setin
  • 557
  • 5
  • 10
four-eyes
  • 10,740
  • 29
  • 111
  • 220