2016-08-31 10 views
0

큰 파일에 git lfs를 사용하도록 git이 제안했습니다. git lfs로 파일을 추적하고 .gitattribute에 추가되었는지 확인한 후에도 파일이 동일한 정확한 파일에 대해 100MB보다 큰 오류가 계속 발생합니다. 여기에있는 제안은 무엇이며 어떻게이 문제를 해결할 수 있습니까? 프로젝트의 일부로 이러한 대용량 파일을 업로드해야 github을 사용할 수 있습니다.git lfs가 100MB보다 큰 파일에 대해 제대로 작동하지 않음

[email protected]:~/computer_vision/py-faster-rcnn$ git push -u origin masterUsername for 'https://github.com': monajalal 
    Password for 'https://[email protected]': 
    Counting objects: 65949, done. 
    Delta compression using up to 40 threads. 
    Compressing objects: 100% (64616/64616), done. 
    Writing objects: 100% (65949/65949), 1.53 GiB | 11.18 MiB/s, done. 
    Total 65949 (delta 29371), reused 2 (delta 0) 
    remote: Resolving deltas: 100% (29371/29371), done. 
    remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com. 
    remote: error: Trace: b3969bd24e3d0b92cab7299bbf735509 
    remote: error: See http://git.io/iEPt8g for more information. 
    remote: error: File caffe-fast-rcnn/boost_1_61_0/bin.v2/libs/math/build/gcc-5.2.1/release/link-static/src/tr1/pch.hpp.gch is 127.21 MB; this exceeds GitHub's file size limit of 100.00 MB 
    remote: error: File data/faster_rcnn_models/ZF_faster_rcnn_final.caffemodel is 226.19 MB; this exceeds GitHub's file size limit of 100.00 MB 
    remote: error: File data/faster_rcnn_models.tgz is 694.81 MB; this exceeds GitHub's file size limit of 100.00 MB 
    remote: error: File data/faster_rcnn_models/VGG16_faster_rcnn_final.caffemodel is 522.92 MB; this exceeds GitHub's file size limit of 100.00 MB 
    remote: error: File caffe-fast-rcnn/boost_1_61_0/bin.v2/libs/math/build/gcc-5.2.1/release/src/tr1/pch.hpp.gch is 127.21 MB; this exceeds GitHub's file size limit of 100.00 MB 
    To https://github.com/monajalal/faster_RCNN.git 
    ! [remote rejected] master -> master (pre-receive hook declined) 
    error: failed to push some refs to 'https://github.com/monajalal/faster_RCNN.git' 



[email protected]:~/computer_vision/py-faster-rcnn$ ls 
caffe-fast-rcnn data experiments lib LICENSE models README.md test tools 
[email protected]:~/computer_vision/py-faster-rcnn$ git lfs track "*.gch" 
Tracking *.gch 
[email protected]:~/computer_vision/py-faster-rcnn$ git lfs track "*.tgz" 
Tracking *.tgz 
[email protected]:~/computer_vision/py-faster-rcnn$ git lfs track "*.caffemodel" 
Tracking *.caffemodel 
[email protected]:~/computer_vision/py-faster-rcnn$ git add -A 
[email protected]:~/computer_vision/py-faster-rcnn$ git commit -m "files larger than 100MB tracked with git lfs" 
[master 
b60c05f] files larger than 100MB tracked with git lfs 
6 files changed, 3 insertions(+) 
create mode 100644 .gitattributes 
rewrite caffe-fast-rcnn/boost_1_61_0/bin.v2/libs/math/build/gcc-5.2.1/release/link-static/src/tr1/pch.hpp.gch (99%) 
rewrite caffe-fast-rcnn/boost_1_61_0/bin.v2/libs/math/build/gcc-5.2.1/release/src/tr1/pch.hpp.gch (99%) 
rewrite data/faster_rcnn_models.tgz (99%) 
rewrite data/faster_rcnn_models/VGG16_faster_rcnn_final.caffemodel (99%) 
rewrite data/faster_rcnn_models/ZF_faster_rcnn_final.caffemodel (99%) 
[email protected]:~/computer_vision/py-faster-rcnn$ 
[email protected]:~/computer_vision/py-faster-rcnn$ ls -a 
. .. caffe-fast-rcnn data experiments .git .gitattributes lib LICENSE models README.md test tools 


[email protected]:~/computer_vision/py-faster-rcnn$ git push -u origin master 
Username for 'https://github.com': monajalal 
Password for 'https://[email protected]': 
Username for 'https://github.com': monajalal 
Password for 'https://[email protected]': 
Git LFS: (5 of 5 files) 1.66 GB/1.66 GB                            
Counting objects: 65972, done. 
Delta compression using up to 40 threads. 
Compressing objects: 100% (64633/64633), done. 
Writing objects: 100% (65972/65972), 1.53 GiB | 11.18 MiB/s, done. 
Total 65972 (delta 29378), reused 2 (delta 0) 
remote: Resolving deltas: 100% (29378/29378), done. 
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com. 
remote: error: Trace: 4acfe1a1fdf5874edf9141fa8327428d 
remote: error: See http://git.io/iEPt8g for more information. 
remote: error: File caffe-fast-rcnn/boost_1_61_0/bin.v2/libs/math/build/gcc-5.2.1/release/link-static/src/tr1/pch.hpp.gch is 127.21 MB; this exceeds GitHub's file size limit of 100.00 MB 
remote: error: File data/faster_rcnn_models/ZF_faster_rcnn_final.caffemodel is 226.19 MB; this exceeds GitHub's file size limit of 100.00 MB 
remote: error: File data/faster_rcnn_models.tgz is 694.81 MB; this exceeds GitHub's file size limit of 100.00 MB 
remote: error: File data/faster_rcnn_models/VGG16_faster_rcnn_final.caffemodel is 522.92 MB; this exceeds GitHub's file size limit of 100.00 MB 
remote: error: File caffe-fast-rcnn/boost_1_61_0/bin.v2/libs/math/build/gcc-5.2.1/release/src/tr1/pch.hpp.gch is 127.21 MB; this exceeds GitHub's file size limit of 100.00 MB 
To https://github.com/monajalal/faster_RCNN.git 
! [remote rejected] master -> master (pre-receive hook declined) 
error: failed to push some refs to 'https://github.com/monajalal/faster_RCNN.git' 
[email protected]:~/computer_vision/py-faster-rcnn$ 

파일 .gitattribute 내부 내가 가진 :

*.gch filter=lfs diff=lfs merge=lfs -text 
    *.tgz filter=lfs diff=lfs merge=lfs -text 
    *.caffemodel filter=lfs diff=lfs merge=lfs -text 
+1

[Github 파일 크기 제한이 6/18/13 변경되었습니다. 지금 당길 수 없다] (http://stackoverflow.com/questions/17382375/github-file-size-limit-changed-6-18-13-cant-push-now) –

답변

1

귀하의 역사는 여전히 제거 다시 작성해야 큰 파일을 포함하고 있습니다.

git bfg은 (자바로 작성된) 역사에서 더 큰 파일을 쉽게 제거 할 수있는 도구입니다.

내장 도구 만 사용하면 --tree-filter과 함께 git filter-branch을 사용하여 파일을 제거 할 수 있습니다 (예는 문서에 있어야 함).

경고 :

참고 BFG와 git filter-branch 재 작성 역사와 같은 도구. 푸시 한 커밋을 다시 작성하면이 커밋을 기반으로 작성한 다른 사용자에게 영향을 미칠 수 있습니다. 조심해서 사용하십시오.