.gitignore表示子目录不忽略文件夹

时间:2017-04-13 06:46:52

标签: git

.gitignore的输出和git推送错误:

$ 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中的东西?不确定这里发生了什么?为什么不忽略它们呢?