github 上傳文件太大被拒絕

問題描述

git 提交代碼到 github 報錯,信息如下:

remote: Resolving deltas: 100% (2/2), completed with 2 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: 009895fb6cf1ddbf7a86e018050f9c09
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File files/jdk/jdk-7u65-windows-x64.exe is 129.69 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://github.com/thebigdipperbdx/SpringBootList.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/thebigdipperbdx/SpringBootList.git'

解決方案

1、移除錯誤緩存

git rm --cached files/jdk/jdk-7u65-windows-x64.exe

2、編輯最後提交信息
編輯最後提交信息,修改 log 信息後保存返回。(即 vi 編輯)

 git commit --amend

3、重新提交

git push

相關文檔

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章