2016-10-01 46 views
1

我在我的旧提交中添加了一个文件,并且没有推送该提交,然后我从目录中删除了该文件。从那以后,我没有更多的变化,并增加了更多的提交和现在每次我尝试当我做git push -u origin mastergit试图上传已经手动删除的文件

Counting objects: 58, done. 
Delta compression using up to 8 threads. 
Compressing objects: 100% (58/58), done. 
Writing objects: 100% (58/58), 197.83 MiB | 370.46 MiB/s, done. 
Total 58 (delta 44), reused 0 (delta 0) 
remote: Resolving deltas: 100% (44/44), completed with 10 local objects. 
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com. 
remote: error: Trace: 7db8d77e8595ae0da9cc34aa2ab1c4d0 
remote: error: See http://git.io/iEPt8g for more information. 
remote: error: File public/uploads.zip is 197.85 MB; this exceeds GitHub's file size limit of 100.00 MB 
To https://github.com/repo-name 
! [remote rejected] master -> master (pre-receive hook declined) 
error: failed to push some refs to 'https://github.com/repo-name' 

的文件中提及uploads.zip之前已经手动删除推我面对这个错误的代码。所以这个文件不存在于dir中。

当我做git log origin/master..master我甚至没有看到列表中的文件。

这里是如果你的git仓库一直尝试上传大文件,你可能要和检查任何跟踪(后来删除)大文件的git statuslink

+2

尝试'git的RM公共/ uploads.z​​ip' –

+0

我同意@PanLong – acornagl

+0

'致命:pathspec '公共/ uploads.z​​ip' 不匹配任何files'文件甚至没有在dir @PanLong –

回答

1

结果。

使用BFG Repo cleaner并查看您的历史记录中是否没有要删除的文件。

Remove all blobs bigger than 10 megabytes :

$ bfg --strip-blobs-bigger-than 10M my-repo.git 

# or 

java -jar bfg.jar --strip-blobs-bigger-than 100M some-big-repo.git 
+0

现在我得到这个错误'错误:无法访问jarfile bfg-1.12。13' –

+0

@Adamnick你可以使用第二种形式'java -jar bfg.jar --strip-blobs-大于100M some-big-repo.git'。当然,用你从http://repo1.maven.org/maven2/com/madgag/bfg/1.12.13/bfg-1.12.13.jar下载的jar的完整路径替换'bfg.jar' – VonC

+0

我已经在使用第二个版本了,还有其他方法吗? –