Adam nick Adam nick - 25 days ago 4
Git Question

git is trying to upload the file already deleted manually

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 -
remote: error: Trace: 7db8d77e8595ae0da9cc34aa2ab1c4d0
remote: error: See for more information.
remote: error: File public/ 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 ''

The file mentioned
has been deleted before manually. so this file does not exist in the dir.

When I do
git log origin/master..master
i don't even see the file in the list.

Here is the result of
git status


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