2017-04-13 153 views
0

輸出繼電器的.gitignore和git推錯誤:的.gitignore子目錄沒有忽略文件夾

$ cat .gitignore 
# Byte-compiled/optimized/DLL files 
__pycache__/ 
*.py[cod] 
*$py.class 

data/processed/* 
data/raw/* 
data/pix2pix/* 


models/CNN/* 

$ git push origin master 
Counting objects: 47, done. 
Delta compression using up to 4 threads. 
Compressing objects: 100% (42/42), done. 
Writing objects: 100% (47/47), 252.98 MiB | 1.48 MiB/s, done. 
Total 47 (delta 5), reused 0 (delta 0) 
remote: Resolving deltas: 100% (5/5), done. 
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com. 
remote: error: Trace: 7dc11d098419f5393103f638c89036ec 
remote: error: See http://git.io/iEPt8g for more information. 
remote: error: File data/processed/facades_data.h5 is 264.29 MB; this exceeds GitHub's file size limit of 100.00 MB 
remote: error: File models/CNN/DCGAN_weights_epoch0.h5 is 124.69 MB; this exceeds GitHub's file size limit of 100.00 MB 
remote: error: File models/CNN/gen_weights_epoch0.h5 is 100.76 MB; this exceeds GitHub's file size limit of 100.00 MB 
To https://github.com/abhigenie92/pix2pix.git 
! [remote rejected] master -> master (pre-receive hook declined) 
error: failed to push some refs to 'https://github.com/abhigenie92/pix2pix.git' 

爲什麼推的東西,已經在的.gitignore?不知道這裏發生了什麼?爲什麼不忽視它們?

+3

的[忽略已經被提交到Git倉庫文件]可能的複製(http://stackoverflow.com/questions/1139762/ignore-files-that-have-already-been-committed-to-a-git-repository) – 1615903

+0

也https:// stackoverflow.com/questions/2100907/how-to-remove-delete-a-large-file-from-commit-history-in-git-repository – 1615903

回答

0
+0

我認爲OP是試圖不承諾在回購的工作巨大的目錄樹。他/她爲此定義了一個.gitignore。運行'git rm --cached data/processed data/raw data/pix2pix'就足夠了。 (路徑末尾的「*」不是必需的) – silel