从git中删除大的提交 [英] Remove large commits from git
问题描述
我们只有在太晚时才意识到这一点,而且大多数人已经拉回了新的巨额回购协议。如果问题没有被推动,那么我们可以做一个重定位来分割那些巨大的提交并修复它,但是现在每个人都已经从中撤出了,那么删除该提交的最好方法是什么(或者做一个rebase删除大文件),然后让这个不是在每个人都想要从/回推到回购站时造成混乱?
它应该是是一个脚本的小回购站,但现在大小约为700M: - (
) 检查出来 https://help.github.com/articles/remove-sensitive-data 。从你的Git仓库中删除敏感数据,但你可以很好地使用它从你的提交中删除大文件。We're running a central git repository (gforge) that everyone pulls from and pushes to. Unfortunately, some inept co-workers have decided that pushing several 10-100Mb jar files into the repo was a good idea. As a consequence of this, our server we use a lot has run out of disk space.
We only realised this when it was too late and most people had pulled the new huge repo. If the problem hadn't been pushed, then we could just do a rebase to snip out those huge commits and fix it, but now everyone has pulled from it, what is the best way to remove that commit (or do a rebase to just remove the large files) and then have this not cause chaos when everyone wants to pull/push from/to the repo?
It's supposed to be a small repo for scripts, but is now about 700M in size :-(
Check this out https://help.github.com/articles/remove-sensitive-data . Here they write about removing sensitive data from your Git repository but you can very well use it for removing the large files from your commits.
这篇关于从git中删除大的提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!