无法从EGit中删除大文件

时间:2016-09-05 08:51:18

标签: eclipse git egit

我在Eclipse Luna SR2(4.4.2)上使用EGit并不能完全 删除大文件BillWeb-0.0.1-SNAPSHOT.jar。

(我已经从源文件夹中删除了它,但是无法从本地Git存储库中删除它) 另外我无法访问命令行Git工具,我只是找不到git.exe。

所以,我的输出:

Repository https://github.com/nnn/nnn.git

pre-receive hook declined
error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
error: Trace: dde7f00c2fbfcbdf958d7869e8a8d0bb
error: See http://git.io/iEPt8g for more information.
error: File BillWeb/src/main/java/WindowsService/BillWeb-0.0.1-SNAPSHOT.jar is 117.23 MB; this exceeds GitHub's file size limit of 100.00 MB

1 个答案:

答案 0 :(得分:0)

首先,我在我的Windows操作系统上安装了git CMD。 然后我使用了这个命令:

git filter-branch --force --index-filter“git rm --cached -r --ignore-unmatch BillWeb / src / main / java / WindowsService / BillWeb-0.0.1-SNAPSHOT.jar” - prune-empty --tag-name-filter cat - --all

它完全从git历史记录中删除了这个文件。我也使用双引号代替单引号,我认为这是因为操作系统要求。

感谢@ThorbjørnRavnAndersen