I added a file in my older commit and without pushing that commit then I deleted that file from the dir. After that I did more changes and added more commits and now every time I try to push the code I face this error when I do
git push -u origin master
Counting objects: 58, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (58/58), done.
Writing objects: 100% (58/58), 197.83 MiB | 370.46 MiB/s, done.
Total 58 (delta 44), reused 0 (delta 0)
remote: Resolving deltas: 100% (44/44), completed with 10 local objects.
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: 7db8d77e8595ae0da9cc34aa2ab1c4d0
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File public/uploads.zip is 197.85 MB; this exceeds GitHub's file size limit of 100.00 MB
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/repo-name'
git log origin/master..master
If your git repo keeps trying to upload large files, you might want and check for any tracked (and later deleted) large files.
Use BFG Repo cleaner and see if, in your history, you don't have some files to remove.
Remove all blobs bigger than 10 megabytes :
$ bfg --strip-blobs-bigger-than 10M my-repo.git # or java -jar bfg.jar --strip-blobs-bigger-than 100M some-big-repo.git