I have a problem to exclude a specific dir out of the git tracking that I once tried to commit and push, as it contains some files inside that are too big to be pushed on the github.
Below is the dir structure.
/git_dir
└-foo
└-.gitignore # "in which I only write '/_data/' "
└-/_data
└- XXX.tsv # a large file
└- other files
What I did:
- wrote a .gitignore to exclude the target dir ('/_data')
- executed git rm --cache -r .
- git add . / git commmit -m 'chore' / git push origin main
Result:
$git push origin main
>>remote: Resolving deltas: 100% (21/21), completed with 2 local objects.
remote: error: Trace: XXXXXX
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File
work/foo/_data/XXX.tsv is 185.07 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
In addition I experimentally deleted the file (XXX.tsv) and did (1) - (3), which made no change. It seems to me that somehow cleaning the cache is not working well. Would you tell me what causes this and how I can solve the situation? Thank you.