git push被ghost文件阻止

时间:2016-10-31 13:06:35

标签: git push

我尝试在https://github.com/jeanpat/DeepFISH上推送一些数据。

然而我在我的本地回购中犯了一个错误,我无法推送到github。在当地,我有:

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

并在数据集中:

$ 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

我忘了在提交之前从数据集目录中删除一个非常大的文件(~800 Mo)。所以当我试图推动时,我有一个错误:

$ 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'

我尝试了几次删除有罪文件 overlapping_subset_pairs.h5 。 当然:

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

因为该文件已被删除。更奇怪的是删除目录数据集并再次添加:

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

使用正确的文件会触发相同的错误:

remote: error: File dataset/overlapping_subset_pairs.h5 is 781.92 MB;

0 个答案:

没有答案