我在这个问题上尝试了一切 Git/Bash is extremely slow in Windows 7 x64
但没有运气。当我卸载并重新安装它大约1小时工作,然后再慢。如果我用GIT_TRACE=1
运行git,我会得到以下结果:
09:25:14.452494 git.c:371 trace: built-in: git 'status'
09:25:14.671494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:14.812494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:14.911494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:15.052494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:15.111494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:15.259494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:15.351494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:15.488494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:15.788494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:15.937494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:16.066494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:16.224494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:16.337494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:16.492494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:16.607494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:16.756494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:16.902494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:17.050494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:17.225494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:17.375494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:17.518494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:17.676494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:17.834494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:17.997494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:18.203494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:18.348494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:18.449494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:18.593494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:18.693494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:18.834494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:18.941494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:19.083494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:19.227494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:19.369494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:19.496494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:19.640494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:19.745494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:19.887494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:19.996494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:20.141494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:20.397494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:20.529494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:20.652494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:20.785494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:20.888494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:21.019494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:21.113494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:21.247494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:21.356494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:21.489494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:21.619494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:21.752494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:21.898494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:22.030494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:22.122494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:22.255494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:22.351494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:22.490494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:22.582494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:22.720494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:22.826494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:22.958494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:23.049494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:23.199494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:23.298494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:23.444494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:23.606494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:23.740494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:23.856494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:23.985494 git.c:371 trace: built-in: git 'status' '--porcelain'
09:25:24.076494 run-command.c:369 trace: run_command: 'status' '--porcelain'
09:25:24.211494 git.c:371 trace: built-in: git 'status' '--porcelain'
接着是通常的输出。
这对我来说似乎不正常,因为通常只有一条状态检查的跟踪线。我在cmder
中使用它,因为它在更新分支细节后运行git命令需要很长时间。关于可能导致这种情况的任何想法?如果没有办法在cmder窗口上禁用git详细信息?
答案 0 :(得分:2)
尝试git gc
这应该可以解决您的问题。为我工作
答案 1 :(得分:-1)
我的git也非常慢。当我在命令提示符下键入git
时,完成时间超过60秒。
我卸载IBM Security Trusteer Rapport后,问题就消失了。