我在一台位于NFS上的Linux机器上有一个10 GB的仓库.第一次git status需要36分钟,之后git status需要8分钟.似乎Git依赖于操作系统来缓存文件.只有第一个git命令commit,status包括打包/重新包装整个回购需要很长时间才能获得巨大的回购.我不确定你是否曾经使用git status过这么大的回购,但有没有人遇到过这个问题?
我已经试过git gc,git clean,git repack但所花费的时间仍是/几乎是相同的.
子模块或任何其他概念,比如将repo打成较小的那些有帮助吗?如果是这样,那么最好分割更大的回购.有没有其他方法可以改善大型仓库上git命令的时间?
我在存储库上使用git进行源代码控制.最近它已经开始警告我在使用时枚举未跟踪文件需要多长时间git status:
$ git status
On branch my_branch
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: My_Project/my_source.c
It took 3.24 seconds to enumerate untracked files. 'status -uno'
may speed it up, but you have to be careful not to forget to add
new files yourself (see 'git help status').
no changes added to commit (use "git add" and/or "git …Run Code Online (Sandbox Code Playgroud)