的.gitignore子目录没有忽略文件夹
问题描述:
输出继电器的.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?不知道这里发生了什么?为什么不忽视它们?
答
请仔细阅读这些文章
https://help.github.com/articles/working-with-large-files/
http://blog.deveo.com/storing-large-binary-files-in-git-repositories/
否则尽量git-submodule
可以在这里找到http://alx.github.io/gitbook/5_submodules.html
+0
我认为OP是试图不承诺在回购的工作巨大的目录树。他/她为此定义了一个.gitignore。运行'git rm --cached data/processed data/raw data/pix2pix'就足够了。 (路径末尾的“*”不是必需的) – silel
的[忽略已经被提交到Git仓库文件]可能的复制(http://stackoverflow.com/questions/1139762/ignore-files-that-have-already-been-committed-to-a-git-repository) – 1615903
也https:// stackoverflow.com/questions/2100907/how-to-remove-delete-a-large-file-from-commit-history-in-git-repository – 1615903