1

I accidently tried to push a large file to git and I got the following error message:

=Counting objects: 1565, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (1559/1559), done.
Writing objects: 100% (1565/1565), 142.13 MiB | 3.95 MiB/s, done.
Total 1565 (delta 1212), reused 2 (delta 0)
remote: Resolving deltas: 100% (1212/1212), completed with 11 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: e3e1d72efbc7d183eda3ef58d3ef93ad
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File pycotools/Examples/Fit1Dir/smad7_not_reproduced_alternative/file.csv is 1607.96 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://github.com/CiaranWelsh/PyCoTools.git
 ! [remote rejected] CopasiVersion19 -> CopasiVersion19 (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/CiaranWelsh/PyCoTools.git'

I have since remove this file from both of my branches but I still keep getting the same error and therefore can't push any of my code. Does anybody have any ideas on what to do here?

update

Following a suggestion in comments

$ git rm --cached /Examples/Fit1Dir/smad7_not_reproduced_alternative/file.csv

produces:

fatal: pathspec 'pycotools/Examples/Fit1Dir/smad7_not_reproduced_alternative/file.csv' did not match any files
CiaranWelsh
  • 7,014
  • 10
  • 53
  • 106
  • 1
    [Removing files from a repository's history](https://help.github.com/articles/removing-files-from-a-repository-s-history/) – Alexan Oct 06 '17 at 14:26
  • Thank you, I tried step 1 of your suggestion and it appears git cannot find the file. – CiaranWelsh Oct 06 '17 at 14:37
  • then look at https://stackoverflow.com/questions/2100907/how-to-remove-delete-a-large-file-from-commit-history-in-git-repository – Alexan Oct 06 '17 at 14:39

0 Answers0