To monitor why git add . slow?
Assume project where no add and commit has been done for a long time.
git add . but it takes too much time.
I would like to estimate which files/directories are most expensive in the current case.
I have a good
.gitignore file which works sufficiently but, still sometimes, I have too much and/or something too difficult to be added and committed to Git.
I have often directories which size is from 300GB to 2 TB in my directories.
Although excluding them by
.gitignore, the addition is slow.
How can you estimate which directories/files are too expensive to be committed?
One Solution collect form web for “To monitor why git add . slow?”
Git slowness is generally from large binary files. This isn’t because they’re binary, just because binary files tend to be large and more complex to compress & diff.
Based on your edit indicating the file sizes, I suspect this is your problem.
The answers to this question offer a few solutions: removing them from source control, manually running
git gc, etc.