I had a 136mb file in my repo that was in my .gitignore
as data.json
that was too big to upload to git. The error message I got was:
remote: error: File data.json is 136.60 MB; this exceeds GitHub's file size limit of 100.00 MB
So far I have tried:
git rm --cached data.json
- Deleting the file from the remote repo
- Copying the file to a new path, deleting it from the old path, and adding the new path to
.gitignore
asdirectory/
. git rm data.json
, which yields the message:fatal: pathspec 'data.json' did not match any files
git reset HEAD --
just in case it was stuck in some staged change.
As I mentioned, the file is currently in a brand new directory on the local repo, and that directory is also in .gitignore
as directory/
. This directory does not exist on the remote repo.
When I git add .
and git commit -m 'blah'
, I see the following:
The following paths are ignored by one of your .gitignore files:
file.db
anotherfile.csv
directory
Use -f if you really want to add them.
After I git push
, I still get the error.
Why is it still trying to push this file?