我有一个git仓库,在一开始工作正常(或在Windows上可以预期),但1周后(或左右)回购速度变慢,当我尝试运行git fetch(以及任何使用fetch的命令)。终端冻结了几分钟,然后取回开始,取回本身不是特别慢,但等待时间使它很痛苦。在开始之前在窗口上等待Git获取
我曾尝试:
- 我的病毒程序的车削
git config --global core.preloadindex true
git config --global core.fscache true
git config --global gc.auto 256
- 再次关闭所有其他应用程序
- 检查出库(适用于几天,然后我回来)。
git gc --aggressive --prune=now
任何人有什么更多的,我可以试试,我曾尝试谷歌,但还没有找到一个解决方案,我的神秘任何想法。
修改(2015-07-02):将git gc --aggressive --prune=now
添加到测试列表中。
我已经运行:
GIT_TRACE=true git pull
trace: exec: 'git-pull'
trace: run_command: 'git-pull'
trace: built-in: git 'rev-parse' '--git-dir'
trace: built-in: git 'rev-parse' '--is-bare-repository'
trace: built-in: git 'rev-parse' '--show-toplevel'
trace: built-in: git 'ls-files' '-u'
trace: built-in: git 'symbolic-ref' '-q' 'HEAD'
trace: built-in: git 'config' 'branch.develop.rebase'
trace: built-in: git 'config' 'pull.rebase'
trace: built-in: git 'rev-parse' '-q' '--verify' 'HEAD'
trace: built-in: git 'fetch' '--update-head-ok'
trace: run_command: 'ssh' '-p' 'port' '[email protected]' 'git-upload-pack '\''/repo'\''
'
trace: run_command: 'rev-list' '--objects' '--stdin' '--not' '--all' '--quiet'
#### WAITING for 2 minutes ####
remote: Counting objects: 59063, done
remote: Finding sources: 100% (124/124)
...
我已标记,其中等待时间。
你试过'git gc'吗? – madhead
试试这个:'git gc --aggressive --prune = now'。它会清理并打包所有松散的文件。 !!!!警告 - 它可能会删除未提交的内容 – CodeWizard
'git gc --aggressive --prune = now'不起作用。 – Aircleaner