0

I have tried to push my local project (Linux) to my existing GitHub repo, but I obtain the following messages:

Counting objects: 31, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (31/31), done.
Writing objects: 100% (31/31), 252.47 MiB | 2.14 MiB/s, done.
Total 31 (delta 21), reused 0 (delta 0)
remote: Resolving deltas: 100% (21/21), 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: f82a2261a9beaa11600c647fb5908566
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File merge.mp4 is 125.31 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File result_merge1.mp4 is 103.98 MB; this exceeds GitHub's file size limit of 100.00 MB

The problem is that the aforementioned files (merge.mp4 and result_merge1.mp4) have been deleted or are in the .gitignore file because I don't want to upload them.

I have tried to see if they are occult, but they are not. Also, I have tried to remove them, but I get a message that they have not been found in my directory.

Any help?

Nayan Sarder
  • 512
  • 1
  • 3
  • 18
Daniel
  • 3
  • 1
  • You should remove them from history. Use BFG Cleaner: https://stackoverflow.com/a/31349737/717372 – Philippe Feb 11 '20 at 14:18
  • 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 Feb 11 '20 at 14:26

1 Answers1

2

If they were ever added, they are still tracked, even if they've never been pushed to the remote. Putting them in the .gitignore is a good step, but you also have to stop tracking them explicitly if they've ever been tracked. To do that, try git rm --cached merge.mp4

You will also want to remove this out of the history of the repo. Putting this all together, you have a command like:

git filter-branch --force --index-filter "git rm --cached --ignore-unmatch merge.mp4" --prune-empty --tag-name-filter cat -- --all
Brian Mego
  • 1,439
  • 11
  • 10