Assuming you have
git lfs installed, how do you go about pushing the file to git.
Performing a standard
git push doesn’t work, git will throw an error saying the file is too large to commit.
Firstly unstage the commit with the large file and then delete the file from your local environment.
Next you need to tell
git lfs to track the large file using this command:
git lfs track "my-large-file.json"
This will also create a
.gitattributes file in the root of the project.
Then add the large file back into your project.
Next add all the files you want to commit:
git add .
This will add the large file and the git attributes file that was created.
Commit the changes:
git commit -m "added large file commit"
Then perform a standard git push:
It will successfully push the large file to your remote git repo.