我试图将我的项目上传至github,但是遇到了以下错误:
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还在尝试推送未被跟踪的文件?