git-rewrite-history

How to remove/delete a large file from commit history in Git repository?

◇◆丶佛笑我妖孽 提交于 2019-11-25 22:13:04
问题 Occasionally I dropped a DVD-rip into a website project, then carelessly git commit -a -m ... , and, zap, the repo was bloated by 2.2 gigs. Next time I made some edits, deleted the video file, and committed everything, but the compressed file is still there in the repository, in history. I know I can start branches from those commits and rebase one branch onto another. But what should I do to merge together the 2 commits so that the big file didn\'t show in the history and were cleaned in