Git状态需要很长时间才能完成 [英] Git Status Takes a Long Time to Complete

查看:127
本文介绍了Git状态需要很长时间才能完成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 git 来管理Windows计算机上本地目录中的文件 - 这里没有涉及网络,我没有推送或拉扯另一个网络机。我的目录中可能有100个文件,所有测试文件都很小。当我运行 git status 时,它通常需要20-30秒才能完成。这是正常的吗?有什么我可以做的,以加快它,或更好的方式来看看我的存储库的状态(更改文件,未跟踪的文件等)?其他 git 命令似乎完成得更快。 git gc ?这清理了git仓库中的垃圾。


I'm using git to manage files in a local directory on a Windows machine - no network is involved here, I'm not pushing or pulling to/from another machine. My directory has maybe 100 files in it, all test files, pretty small. When I run git status, it regularly takes 20-30 seconds to complete. Is this normal? Is there anything I can do to speed it up, or a better way to see what the state of my repository is (changed files, untracked files, etc)? Other git commands seem to complete much faster.

解决方案

Have you tried git gc? This cleans cruft out of the git repo.

这篇关于Git状态需要很长时间才能完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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