git的某個版本周,我不小心把exe文件也push上去了,现在每次git clone的时候,都很大。如何删除之前版本commit的exe?

How to remove a too large file in a commit when my branch is ahead of master by 5 commits

 

https://web.archive.org/web/20190207210108/http://stevelorek.com/how-to-shrink-a-git-repository.html

 

在尝试这个策略。

https://www.jianshu.com/p/335e5ac0a823

 

https://www.jianshu.com/p/335e5ac0a823

 

 

终于成功了!!!

 

 

需要注意的是,

要rebase 处理很多次很多次冲突。

(1)git rebase --skip

(2)git rm README.md

(3) git rebase --continue

 

反复很多次之后。

用本地的,去覆盖远程的

git push -f --set-upstream origin main:main

 

在命令行里搞。

posted @ 2021-05-22 21:36  bH1pJ  阅读(40)  评论(0编辑  收藏  举报