我想我的項目推到github上,並收到以下錯誤文件:Git的努力推動未進行跟蹤
Counting objects: 87, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (78/78), done.
Writing objects: 100% (87/87), 50.25 MiB | 1.14 MiB/s, done.
Total 87 (delta 32), reused 0 (delta 0)
remote: warning: File example-attractor/bin/example-attractor_debug.ilk is 51.19 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: f711bd940689c3c64a38c283877b86f8
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File example-attractor/example-attractor.sdf is 103.62 MB; this exceeds GitHub's file size limit of 100.00 MB
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs
好了,沒什麼大不了的。我加了*.sdf
和*.ilk
我.gitignore
,刪除,並添加我的所有文件,並通過檢查git ls-files
我跟蹤文件:
.gitignore
example-attractor/README.md
example-attractor/addons.make
example-attractor/example-attractor.sln
example-attractor/example-attractor.vcxproj
example-attractor/example-attractor.vcxproj.filters
example-attractor/icon.rc
example-attractor/src/main.cpp
example-attractor/src/ofApp.cpp
example-attractor/src/ofApp.h
太好了!這些文件已從跟蹤中刪除。我試圖再次推送到Github,並得到了同樣的錯誤。我跑git status
並沒有改變:
On branch master
Your branch is ahead of 'origin/master' by 3 commits.
(use "git push" to publish your local commits)
nothing to commit, working directory clean
我困惑,現在怎麼辦!爲什麼git仍然試圖推送未被追蹤的文件?
可能的重複[如何在我的分支由5個提交超前主提交時刪除提交中的一個太大的文件](http://stackoverflow.com/questions/20002557/how-to-remove-a-too -large-file-in-a-commit-when-my-branch-is-ahead-of-master-by) – Powerlord
不幸的是,沒有解決方案解決了我的問題:( –