- 背景:github上传了ideaIC-2020.2.2.win.zip,导致该仓库不可用
- 记录下了解决过程,供各位参考
- 上传了该文件之后,我发现不不对劲,就使用了Git的delete功能,但是并不能解决问题,就去寻找了解决方案,发现是使用了一条删除指令git rm -rf,完整执行它及之后的指令就确实解决了
this exceeds GitHub’s file size limit of 100.00 MB 解决方案
-
关键信息
-
remote: error: File IDEA offline plugin/ideaIC-2020.2.2.win.zip is 643.44 MB; this exceeds GitHub’s file size limit of 100.00 MB
-
请在
.git
文件夹所在目录执行
# 列出当前仓库占用磁盘最大的前10个对象,对我来说没有作用,因为我已经执行了Git delete
ylm@DESKTOP-OJI7U38 MINGW64 /f/project/knight/github/testsome (master)
$ git rev-list --all | xargs -rL1 git ls-tree -r --long | sort -uk3 | sort -rnk4 | head -10
100644 blob 8f5d84ff1141757a49d016693a1347d52571af75 1342446 IDEA offline plugin/for 2020.2/StringManipulation-8.4.191.000.0.zip
100644 blob 82126a2b47e43500fd258cd850bf76cf1177e54a 1150111 IDEA offline plugin/for 2020.2/MavenRunHelper-4.10.193.000.0.zip
100644 blob 5d2b164730286f7c580d0996de47bdcee0e8c562 1027395 IDEA offline plugin/for 2020.2/free-idea-mybatis-2019.12.18.zip
100644 blob 461ca839096b33845d3dc6e24f2dd65877d2f3d5 627942 IDEA offline plugin/for 2020.2/qaplug-1.3.23.zip
100644 blob 78f21cafce9974fb1068d7741e90c9952ee229fe 422800 IDEA offline plugin/for 2020.2/intellij-rainbow-brackets-6.10.zip
100644 blob 82e245e730b745221eed937748dce5f5eb15274f 245673 IDEA offline plugin/for 2020.2/RestfulToolkit-2.0.9.jar
100644 blob 549830f3f371b0af2dabb6d8ed128c77a4340597 12871 jdk8features/src/test/java/com/diy/sigmund/testsome/StreamTest.java
100644 blob 781ec342e029dc57019ab9f1be2c1d1812237f73 7330 jdk8features/src/test/java/com/diy/sigmund/testsome/LocalDateTimeTest.java
100644 blob 5db145c0d9d2fb6cea700cb058f462271b8ffc35 5873 jdk8features/src/test/java/com/diy/sigmund/testsome/OptionalTest.java
100644 blob 2f2c6d6e1c4b64ed837ad583ebf08a27c12c8c8d 4417 jdk8features/pom.xml
# 删除IDEA offline plugin/ideaIC-2020.2.2.win.zip
ylm@DESKTOP-OJI7U38 MINGW64 /f/project/knight/github/testsome (master)
$ git filter-branch --force --index-filter "git rm --cached --ignore-unmatch IDEA offline plugin/ideaIC-2020.2.2.win.zip" --prune-empty --tag-name-filter cat -- --all
Rewrite 2bb247cf9014fdaaef4b03489da710b8a41e8f0a (2/3) (1 seconds passed, remaining 0 predicted)
WARNING: Ref 'refs/heads/master' is unchanged
WARNING: Ref 'refs/remotes/origin/master' is unchanged
WARNING: Ref 'refs/remotes/origin/master' is unchanged
# commit
ylm@DESKTOP-OJI7U38 MINGW64 /f/project/knight/github/testsome (master)
$ git commit --amend -CHEAD
[master fd64ae4] IDEA离线插件,for 2020.2
Date: Wed Sep 16 20:38:30 2020 +0800
6 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 IDEA offline plugin/for 2020.2/MavenRunHelper-4.10.193.000.0.zip
create mode 100644 IDEA offline plugin/for 2020.2/RestfulToolkit-2.0.9.jar
create mode 100644 IDEA offline plugin/for 2020.2/StringManipulation-8.4.191.000.0.zip
create mode 100644 IDEA offline plugin/for 2020.2/free-idea-mybatis-2019.12.18.zip
create mode 100644 IDEA offline plugin/for 2020.2/intellij-rainbow-brackets-6.10.zip
create mode 100644 IDEA offline plugin/for 2020.2/qaplug-1.3.23.zip
# 请注意,git push origin master执行前需先pull最新的代码,所以我才执行了2次
ylm@DESKTOP-OJI7U38 MINGW64 /f/project/knight/github/testsome (master)
$ git push origin master
fatal: HttpRequestException encountered.
▒▒▒▒▒▒▒▒ʱ▒▒▒▒
fatal: HttpRequestException encountered.
▒▒▒▒▒▒▒▒ʱ▒▒▒▒
To https://github.com/ylm-sigmund/testsome.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/ylm-sigmund/testsome.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
ylm@DESKTOP-OJI7U38 MINGW64 /f/project/knight/github/testsome (master)
$ git push origin master
fatal: HttpRequestException encountered.
▒▒▒▒▒▒▒▒ʱ▒▒▒▒
fatal: HttpRequestException encountered.
▒▒▒▒▒▒▒▒ʱ▒▒▒▒
Enumerating objects: 2, done.
Counting objects: 100% (2/2), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 442 bytes | 221.00 KiB/s, done.
Total 2 (delta 0), reused 0 (delta 0)
To https://github.com/ylm-sigmund/testsome.git
2bb247c..fa34b68 master -> master
# over
ylm@DESKTOP-OJI7U38 MINGW64 /f/project/knight/github/testsome (master)