2016-10-01 45 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

我已經在使用第二個版本了,還有其他方法嗎? –