Ways to improve git status performance

后端 未结 10 838
遇见更好的自我
遇见更好的自我 2020-12-02 06:51

I have a repo of 10 GB on a Linux machine which is on NFS. The first time git status takes 36 minutes and subsequent git status takes 8 minutes. Se

10条回答
  •  攒了一身酷
    2020-12-02 07:11

    Something that hasn't been mentioned yet is, to activate the filesystem cache on windows machines (linux filesystems are completly different and git was optimized for them, therefore this probably only helps on windows).

    git config core.fscache true
    


    As a last resort, if git is still slow, one could turn off the modification time inspection, that git needs to find out which files have changed.

    git config core.ignoreStat true
    

    BUT: Changed files have to be added afterwards by the dev himself with git add. Git doesn't find changes itself.

    source

提交回复
热议问题