error: failed to push some refs to (URL) because a file exceeds file size limit Event if the file it No longer exists

56 Views Asked by At

Today I'm having some problems while pushing my project into GitHub, I had a 7z file That measures more than 100mb, I deleted it and still failed to push because of it, It doesn't even exist in the actual folder how can I fix that?

I've tried a lot of things such as "reinit" the repository but it still doesn't work, I also tried to use a different file with the same name and file extension with lower size, (text file inside a 7Zip file) but it still doesn't work, Also I tried to delete .git/hooks/pre-push and deleted all inside .git/hooks/ folder but still doesn't What can I do?

Edit 1: The git status command the output shows this

    On branch main
Your branch is ahead of 'origin/main' by 11 commits.
  (use "git push" to publish your local commits)

nothing to commit, working tree clean

Edit 2: I also tried the git reset --soft HEAD~1 command, committed the changes, and then pushing them but still doesn't work the file doesn't exist and still detects the same file.

Edit 3: the file that is causing that is example_mods\vs-bloodiey\sourcefiles\assets.7z it measures more than 100mb but I already deleted it and still can't push because of it

Sorry for not putting this information earlier I was busy until now

1

There are 1 best solutions below

0
Bloodiey Wafflecat On

Thanks for the help of Gilles Quénot and NoDataFound about the git status command, In the track, I saw a lot of commits behind so I used the command git reset --soft but instead of HEAD~1 I used HEAD~(number of commits ahead) for example in my case was 11 so used HEAD~11 I pulled the changes and that solved my problem thank you.