【发布时间】:2015-12-09 10:03:59
【问题描述】:
我不小心在我的 repo 中提交了一个不必要的大子文件夹 xxxxx,当我在推送时意识到这一点时,我在中途停止了推送。
然后我从 repo 中删除了一个不必要的文件夹 xxxxx,使用
git rm -r --cached xxxxx
但是,虽然ls-files 没有显示 xxxxx 文件夹,但当我显示git push 时,git 仍在尝试推送它:
git push --verbose
(...)
Counting objects: 19, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (18/18), done.
POST git-receive-pack (chunked)
Writing objects: 100% (19/19), 132.93 MiB | 197.00 KiB/s, done.
Total 19 (delta 5), reused 0 (delta 0)
remote: warning: File xxxxx/a.csv is 72.22 MB; this is larger than GitHub Enterprise's recommended maximum file size of 50.00 MB
remote: error: GH001: Large files detected.
remote: error: File xxxxx/b is 112.37 MB; this exceeds GitHub Enterprise's file size limit of 100.00 MB
如何让 git 永久忘记 "xxxxx" 文件夹及其内容?
【问题讨论】:
-
这些文件的提交是最新的吗?
-
是的。但是这个提交还包括一些我不想恢复的有效更改。