Push Reject due to Binary Files
Hey everyone, so I updated the code for one of my HF spaceDuring which I had added a few images inimagefolder;Then I had commited these changes, but when I tried to push the code, I got this error:remote: -------------------------------------------------------------------------
remote: Your push was rejected because it contains binary files.
remote: Please use https://git-lfs.github.com/ to store binary files.
remote: See also: https://hf.co/docs/hub/repositories-getting-started#terminal
remote:
remote: Offending files:
remote:   - images/teddy.jpg (ref: refs/heads/main)
remote: ----------------------------------------------Since the image files were theOffending files,I removed them from getting tracked by git using the commandgit rm -r --cached FolderNameAnd updated the.gitignorewith theimagefolder.But I still recieved the same error when trying to push, even though theimagefolder is no more getting tracked by git.How may I resolve this issue?[Additional Question]: Since I was trying to upload theimagesfor hf space example inference, do I need to usegit-lfsas recommended in the error message or is there some other way?
2024-06-12T13:35:40Z
The above issue was resolved with the help of a similar previous issue.Link -Git LFS fail for Spaces with Github WorkflowThe issue was apparently a common error of not filtering the “offensive files” from the git history.refer -Nevermind, found an answer to remove git history of all large file by running the following git commandThanks to all the contributors of the earlier issue/fix.
2024-06-14T16:59:17Z
This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.