Home  >  Q&A  >  body text

git status 命令速度特别慢怎么回事

第一次很慢,然后紧接着就快了
如果过了3-5个小时就又很慢了
第二天开机的时候运行 git status必定很慢

淡淡烟草味淡淡烟草味2751 days ago2345

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-04-28 09:08:01

    It should be caused by the I/O cache of the operating system. If your warehouse is large and there are many files in the workspace, git will have to read more data, so it will be slower. After the first read, the operating system will cache the relevant data in the disk, because it has been read into the memory anyway. If it is not needed, it would be better to keep it for the next time. After a while, this part of the cache will be replaced by new data, so it will be slow again.

    Try git status -uno to see if it will be faster. See man git-status.

    reply
    0
  • 淡淡烟草味

    淡淡烟草味2017-04-28 09:08:01

    Try closing anti-virus software such as 360baidu

    reply
    0
  • Cancelreply