0

I try to push some data on https://github.com/jeanpat/DeepFISH.

However I made a mistake on my local repo and I can't push to github. Locally, I have:

jeanpat@laptop:~/Developpements/DeepFISH$ du -sh * | sort -h
4,0K    README.md
36K    LICENSE
852K    notebooks
35M    dataset
220M    Raw images

and in dataset:

$ cd dataset/
jeanpat@laptop:~/Developpements/DeepFISH/dataset$ du -sh * | sort -h
3,1M    Cy3.tif
3,1M    DAPI.tif
5,6M    overlapping_chromosomes_examples.h5
24M    LowRes_13434_overlapping_pairs.h5

I forget to remove a very big file (~800 Mo) from the dataset directory before committing. So when I try to push, I have an error:

$ git push


Username for 'https://github.com': jeanpat
Password for 'https://jeanpat@github.com': 
Décompte des objets: 164, fait.
Delta compression using up to 4 threads.
Compression des objets: 100% (125/125), fait.
Écriture des objets: 100% (164/164), 155.42 MiB | 587.00 KiB/s, fait.
Total 164 (delta 3), reused 1 (delta 0)
remote: Resolving deltas: 100% (3/3), done.
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: 756701cea8d6178d83223e7d60972ea6
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File dataset/overlapping_subset_pairs.h5 is 781.92 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://github.com/jeanpat/DeepFISH
 ! [remote rejected] master -> master (pre-receive hook declined)
error: impossible de pousser des références vers 'https://github.com/jeanpat/DeepFISH'

I try several time to remove the guilty file overlapping_subset_pairs.h5. Of course:

jeanpat@laptop:~/Developpements/DeepFISH$ git rm dataset/overlapping_subset_pairs.h5
fatal: le chemin 'dataset/overlapping_subset_pairs.h5' ne correspond à aucun fichier

since the file was deleted. More weirdly removing the directory dataset and adding it again :

jeanpat@laptop:~/Developpements/DeepFISH$ git rm -r dataset
jeanpat@laptop:~/Developpements/DeepFISH$ git add dataset

with the right files triggers the same error:

remote: error: File dataset/overlapping_subset_pairs.h5 is 781.92 MB;
Jean-Pat
  • 1,839
  • 4
  • 24
  • 41
  • Isn't the problem then that your file is too big, not that it's overwriting? – Eli Sadoff Oct 31 '16 at 13:08
  • If `git rm` isn't working, then try regular `rm`. – Eli Sadoff Oct 31 '16 at 13:08
  • As long as it's contained in a single commit, github will reject it. Use `git reset HEAD~{number of commits}` to completely undo the commits, and then create a new one with your fixed version. – Stephan Bijzitter Oct 31 '16 at 13:09
  • how can I know the number of commits? I think I may have git commit -a two or three times after having tried to remove the big file. – Jean-Pat Oct 31 '16 at 13:11
  • ...or read one of the [many other existing stackoverflow questions](https://www.google.com/search?q=site%3Astackoverflow.com+github+%22large+files+detected%22&oq=site%3Astackoverflow.com+github+%22large+files+detected%22&aqs=chrome..69i57j69i58.8335j0j4&sourceid=chrome&ie=UTF-8) about exactly this problem. – larsks Oct 31 '16 at 13:14
  • Sorry I m new to git. How would you reformulate the question using the right git vocabulary? – Jean-Pat Oct 31 '16 at 13:16
  • thanks for the link – Jean-Pat Oct 31 '16 at 13:17

0 Answers0