I have a portable USB-stick on which I store a git repository containing documents. I use git on that stick to apply easy backup- and versioning-control for my documents.
Recently, I bought a new stick and switched from using the NTFS filesystem on the stick to exFAT, using Arch Linux‘ exfat-utils
package, which uses FUSE to mount the filesystem.
Unfortunately, git was being totally slow when used on an exfat filesystem, resulting in a huge delay with a simple git status
operation on my 3.3GiB repository:
$ time git status
[...]
real 1m20.514s
user 0m50.282s
sys 0m2.851s
As you see, over 80 seconds to do a simple git status
.
I had a similar problem when switching a Borg Backup repository to exFAT, because Borg Backup uses inode-numbers for a fast check whether a file is modified, so I had the suspicion git is doing similar stuff.
Solution: At a deeper look at man git-config
, I found the option core.checkStat
. Setting this to the value minimal
with git config core.checkStat minimal
fixed the problem! See the manpage for what this option does in detail.
Now git status
runs much faster:
$ time git status
[...]
real 0m0.109s
user 0m0.029s
sys 0m0.055s