git - .gitignore 即使在删除缓存后也不起作用
问题描述
我有一个问题要从我曾经尝试提交和推送的 git 跟踪中排除一个特定的目录,因为它包含一些太大而无法在 github 上推送的文件。
下面是目录结构。
/git_dir
└-foo
└-.gitignore # "in which I only write '/_data/' "
└-/_data
└- XXX.tsv # a large file
└- other files
我做了什么:
- 写了一个 .gitignore 来排除目标目录('/_data')
- 执行 git rm --cache -r 。
- 混帐添加。/ git commmit -m 'chore' / git push origin main
结果:
$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.
另外我实验性地删除了文件(XXX.tsv)并做了(1)-(3),没有任何改变。在我看来,以某种方式清理缓存效果不佳。你能告诉我是什么原因造成的,我该如何解决这个问题?谢谢你。
解决方案
推荐阅读
- detox - 有没有办法选择排毒测试的顺序?
- apache-flink - 在 Flink 集群上运行的 Apache Beam 管道失败
- r - R:如何读取单元格引用以及从 Excel 读取数据
- c - 如何在 C 中使用 strtol 将数字从命令行转换为 inter?
- javascript - 是否可以从该函数采用的回调内部退出(本机)函数?
- javascript - 用 javascript 添加 HTML 元素(不仅仅是替换)
- excel - 访问 Worksheetfunction 例程时出现问题
- android - MPAndroidChart:如何拥有可拖动的数据条目
- ios - 如何在 XCode 中更改 React Native 应用程序的“显示名称”?
- spring - 创建名为“repositorySearchController”的 bean 时出错