0

I am trying to push my repo to github. However, it thinks I have a large file in my repo.

  1. I downloaded kaggle data in a .zip file
  2. unzipped the file
  3. deleted the .zip file
  4. added the data files to .gitignore
  5. commit changes
  6. tried to push

My push is being rejected because it thinks that the .zip file is still in my repository. It is most definitely not.

This is what my git log looks like. The revert is because I accidentally commited the data files before adding them to .gitignore:

commit 80c89f82d1db6083904f5eb9f48a11399826881e
Author: Wesley Neill <wesley.neill@gmail.com>
Date:   Tue Mar 24 18:55:15 2020 +0000

    added notebook for foliar comp

commit 6d9d44adc2667127c143836b0b46ecb06185116d
Author: Wesley Neill <wesley.neill@gmail.com>
Date:   Tue Mar 24 18:47:21 2020 +0000

    Revert "added foliar disease project"

    This reverts commit 9dc9ca2c5f2917fbfbb9da28880a9e3c22d7668e.

commit 9dc9ca2c5f2917fbfbb9da28880a9e3c22d7668e
Author: Wesley Neill <wesley.neill@gmail.com>
Date:   Tue Mar 24 18:44:33 2020 +0000

    added foliar disease project

commit bb1e418ddee28f75bba1ee31f504e02ac909a082
Author: Wesley Neill <wesley.neill@gmail.com>
Date:   Sun Mar 22 13:22:58 2020 -0700

    started kaggle repo with existing titanic submission
phd
  • 82,685
  • 13
  • 120
  • 165
rocksNwaves
  • 5,331
  • 4
  • 38
  • 77
  • 1
    Whether or not the duplicate is helpful, this is not an answerable question as-is. It would help to provide a procedure you've tested (as in, specific commands someone can copy-and-paste without changes) to create a repository in the state you're describing. The log format provided doesn't tell us what's actually in your commits, which is critical information; see [mre] guidelines. – Charles Duffy Mar 24 '20 at 19:58
  • 2
    One thing you might try doing is squashing the commit that introduces the file and the one that reverts it together, so the introduction is no lenger in history. – Charles Duffy Mar 24 '20 at 20:01
  • Thank you, this answered my question: https://help.github.com/en/github/authenticating-to-github/removing-sensitive-data-from-a-repository – rocksNwaves Mar 24 '20 at 20:04

0 Answers0