1

I'm new to the git / github interface and I had a problem that I can't solve. I added a file that exceeds the github size limit (I didn't know there was a limit) and when I proceeded with the routine of committing the following error:

$ git push -u origin master
Enumerating objects: 979, done.
Counting objects: 100% (979/979), done.
Delta compression using up to 4 threads
Compressing objects: 100% (955/955), done.
Writing objects: 100% (966/966), 701.62 MiB | 1.87 MiB/s, done.
Total 966 (delta 560), reused 0 (delta 0)
remote: Resolving deltas: 100% (560/560), completed with 6 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: e381cf3e4d0af4532f85455ca510e90e
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File dynamo/dynamo_2_x_para_revit/DynamoInstall2.0.3.exe is 212.07 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://github.com/renatogcruz/3D_BIM.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/renatogcruz/3D_BIM.git'

Note 1 - git version 2.21.0.windows.1; Note 2 - as the file was not necessary for the repository, as soon as the problem arose, I deleted the file from the directory and so on; Note 3 - even with the problem, I continue to develop the work. So, the solution must maintain the current stage of the work. Thanks

  • 1
    Does this answer your question? [How to remove/delete a large file from commit history in Git repository?](https://stackoverflow.com/questions/2100907/how-to-remove-delete-a-large-file-from-commit-history-in-git-repository) – phd Apr 08 '20 at 21:29
  • https://stackoverflow.com/search?q=%5Bgit%5D+remove+large+file – phd Apr 08 '20 at 21:29

1 Answers1

1

as the file was not necessary for the repository, as soon as the problem arose,

That might not be enough if the file was previously committed.

Try the new git filter-repo, which will replace the old git filter-branch or BFG

You can use to remove any big file from the repository history

git filter-repo --strip-blobs-bigger-than 10M 

Replace 10M by the appropriate size.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I still have a problem, friend. $ git filter-repo --strip-blobs-bigger-than 100M warning: garbage found: .git/objects/ea/tmp_obj_vk2SAa Aborting: Refusing to overwrite repo history since this does not look like a fresh clone. (expected freshly packed repo) To override, use --force. I really don't know how to act. – Renato G. Cruz Apr 19 '20 at 13:54
  • 1
    @RenatoG.Cruz Try it first on a fresh clone. – VonC Apr 19 '20 at 14:08