问题描述
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