混帐我可以加快提交? [英] git can I speed up committing?

查看:126
本文介绍了混帐我可以加快提交?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在共享文件夹中有一个很大的存储库。
我在该文件夹的虚拟机内部使用git。
一切都很好,但是存储库很大
,并且git在提交缓慢时搜索所有目录和文件

我无法将此存储库移出共享文件夹。



我尝试了 git add 特定文件和目录
,但是当我做 git commit -msomething时,它仍然会跳到
,它通过目录树是奇怪的。



我可以进行忽略树的其余部分的提交吗?

解决方案

您可以尝试启用preloadindex选项,如 git-config手册页所述:


core.preloadindex


$ b


为操作启用并行索引预加载像git diff

这可以加速像git diff和git status这样的操作,特别是在像NFS这样的文件系统上,它具有弱缓存语义和相对较高的IO延迟。如果设置为true,git将并行执行与文件系统数据的索引比较,从而允许重叠IO。


打开此项使用:

  git config core.preloadindex true 


I have a big repository in a shared folder. I use git from within a VM on that folder. Everything works nice, but the repository is big and git's searching through all directories and files when committing is slow. I cannot move this repository out of the shared folder.

I tried to git add specific files and directories, but when I do git commit -m "something" it still goes off onto it's oddyssey through the directory tree.

Can I do commits that ignore the rest of the tree?

解决方案

You can try enabling the preloadindex option, described in the git-config man page:

core.preloadindex

Enable parallel index preload for operations like git diff

This can speed up operations like git diff and git status especially on filesystems like NFS that have weak caching semantics and thus relatively high IO latencies. With this set to true, git will do the index comparison to the filesystem data in parallel, allowing overlapping IO's.

To turn this on use:

git config core.preloadindex true

这篇关于混帐我可以加快提交?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆