I want to push my NextJS Project to GitHub but I always get an error that says my .next/cache folder exceeds GitHub's file size limit.
I tried to solve this by adding the next folder to the .gitignore file.
This is my .gitignore file
node_modules
next
.env
Then I followed this steps:
- Make changes in
.gitignore
file - Run
git rm -r --cached .
command. - Run
git add .
command git commit -m "Commit message"
or justgit commit
or continue working.git push
But it still didn't work.
Error that I got
remote: error: File .next/cache/webpack/client-development/32.pack is 122.93 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File .next/cache/webpack/client-development/71.pack is 126.09 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File .next/cache/webpack/client-development/9.pack is 155.84 MB; this exceeds GitHub's file size limit of 100.00 MB
Did I write something wrong in my .gitignore file or is there another problem?
Thank's for helping out!