Deprecated ‐ How to add large phantom files to LFS - xcist/documentation GitHub Wiki
How to add large phantom files to LFS
If you have phantom files that are large, you will need to add it to the GitHub LFS (Large File System). First, install LFS on your computer by following these instructions: https://docs.github.com/en/repositories/working-with-files/managing-large-files/installing-git-large-file-storage?platform=windows After you've verified that LFS is installed correctly, run the following commands:
git lfs track "*.nrb"
This is to tell git which files will be stored in the LFS. In the above example, all files with the ".nrb" extension will be stored in the LFS. If your phantom files have a different extension, use that instead of ".nrb".
Next, run this command to add a phantom file. (This is similar to adding a regular file to git.)
git add <my_phantom_file_name.nrb>
You can also add multiple files at the same time as in the case of regular files:
git add *.nrb
However, because phantom files are typically quite large (50-70+ MB), it is recommended that you add one phantom file at first to make sure that it is correctly uploaded to the GitHub LFS without any issues. Once that file has been successfully uploaded, you can upload the rest of them together.
Commit your files and push, just as with regular files:
git commit -a
git push
Verify that the files you uploaded are in the LFS. There are two ways to do this:
- Go to the URL of the repository and folder via your regular web browser. Look for the file size and also a line indicating 'Stored with Git LFS.'
- From the command line, you can run this command to show all your files that in the LFS:
git lfs ls-files