大文件的 git 配置设置
处理非常大的二进制文件(> 500 MB)时,推荐的 git 配置设置有哪些?
阅读文档 ,似乎将 pack.window
设置为 0,将 pack.depth
设置为非常低的值(例如 2),将 pack.compression
设置为 0, git 操作会更快,但事实似乎并非如此。
我还缺少其他选择吗?我希望能够加快像 git log 这样的简单命令的速度,因为它似乎在每次提交大文件时都会暂停。
What are some recommended git config settings when working with very large binary files (> 500 MB)?
Reading the documentation, it seems as if setting pack.window
to 0, pack.depth
to something very low like 2, and pack.compression
to 0, git operations would be faster, but this doesn't seem to be the case.
Are than any other options that I'm missing? I'm hoping to speed up even simple commands like git log
because it seems to pause at every commit with a large file.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,实际上没有任何设置可以被认为是“最佳”。大多数人建议使用某种外部资产管理。就个人而言,我会将文件放在 ftp 服务器上,扩展名为 YYYYMMDD##,然后在我的 git 存储库中有一个小脚本,用于检查我是否有正确的版本,如果没有则下载它,并检查 脚本到git中。这样,您仍然可以将源代码的版本与二进制资产的正确版本进行匹配,但它不会减慢您的 git 操作。
To my knowledge there isn't really any setting that can be considered "optimal." Most people recommend the use of external asset management of some kind. Personally, I would put the files on an ftp server, with YYYYMMDD## extensions, and then in my git repo have a small script that checks if I have the right version and downloads it if I don't, and check the script into git. That way, you can still match versions of your source code with the right versions of your binary assets, but it isn't slowing down your git operations.