0

Ouput of .gitignore and git push error:

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

Why is pushing stuff that is already in .gitignore? Not sure what is happening here? Why doesn't it ignore them?

Abhishek Bhatia
  • 9,404
  • 26
  • 87
  • 142
  • 3
    Possible duplicate of [Ignore files that have already been committed to a Git repository](http://stackoverflow.com/questions/1139762/ignore-files-that-have-already-been-committed-to-a-git-repository) – 1615903 Apr 13 '17 at 07:02
  • Also https://stackoverflow.com/questions/2100907/how-to-remove-delete-a-large-file-from-commit-history-in-git-repository – 1615903 Apr 13 '17 at 07:03

1 Answers1

0

Please go through these articles

https://help.github.com/articles/working-with-large-files/

http://blog.deveo.com/storing-large-binary-files-in-git-repositories/

Otherwise try git-submodule can be found here http://alx.github.io/gitbook/5_submodules.html

zachi
  • 374
  • 2
  • 3
  • 12
  • I think the OP is trying not to commit the huge directories in the repo's work tree. He/She defined a .gitignore to that end. Running `git rm --cached data/processed data/raw data/pix2pix` should be enough. (the '*' at the end of the path for directories is not necessary) – silel Apr 13 '17 at 20:17