To monitor why git add . slow?

Assume project where no add and commit has been done for a long time.
I do 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 directory/* and directory/ in .gitignore, the addition is slow.

  • How to use git to checkout a specified version of Webkit?
  • Pipe git diff to git checkout
  • What is the difference between pull and clone in git?
  • Git CRLF for windows users
  • git rebase a single commit
  • Git: Best way to add only some parts of a file from another branch?
  • How can you estimate which directories/files are too expensive to be committed?

  • Checking out a maven project from a git repository
  • How to permanently set the Jenkins system property for Git plugin timeout?
  • How do i set and in Intellij 14 with GIT integration?
  • Prevent commits in a local branch
  • git annex / ssh : ControlPath too long
  • Git or Subversion for a TFS user
  • 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.

    Git Baby is a git and github fan, let's start git clone.