跟踪大型二进制文件时,git非常慢 [英] git is very very slow when tracking large binary files
问题描述
有没有办法从存储库中清除大小大于5MB的所有文件。我知道我会失去所有这些文件,这对我来说没问题。
理想情况下,我想要一个列出所有大文件(> 5MB)的命令。我可以看到列表,然后我说好吧继续前进,删除这些文件,并使git更快。
我应该提到git不仅在我的机器上很慢,而且正在部署分段环境应用程序现在需要大约3个小时。
所以修复应该是会影响服务器的,而不仅仅是存储库的用户。 解决方案
你垃圾收集?
git gc
即使是小回购,这也会带来显着的速度差异。
My project is six months old and git is very very slow. We track around 30 files which are of size 5 MB to 50 MB. Those are binary files and we keep them in git. I believe those files are making git slow.
Is there a way to kill all files of size > 5MB from the repository. I know I would lose all of these files and that is okay with me.
Ideally I would like a command that would list all the big files ( > 5MB) . I can see the list and then I say okay go ahead and delete those files and make git faster.
I should mention that git is slow not only on my machine but deploying the app on staging environment is now taking around 3 hours.
So the fix should be something that will affect the server and not only the users of repository.
解决方案Do you garbage collect?
git gc
This makes a significant difference in speed, even for small repos.
这篇关于跟踪大型二进制文件时,git非常慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!