Git es muy lento en OS X

Cada vez que uso algo relacionado con Git en mi MacBook (nueva Macbook Pro con El Capitan), me lleva casi un minuto completo cada comando. hice un sencillo

GIT_TRACE=1 git stash

y obtuve esto:

17:04:27.460826 git.c:557               trace: exec: 'git-stash'
17:04:27.463136 run-command.c:347       trace: run_command: 'git-stash'
17:04:32.503827 git.c:348               trace: built-in: git 'rev-parse' '--git-dir'
17:04:34.521223 git.c:348               trace: built-in: git 'rev-parse' '--show-toplevel'
17:04:35.527473 git.c:348               trace: built-in: git 'config' '--get-colorbool' 'color.interactive'
17:04:36.534443 git.c:348               trace: built-in: git 'config' '--get-color' 'color.interactive.help' 'red bold'
17:04:37.538357 git.c:348               trace: built-in: git 'config' '--get-color' '' 'reset'
17:04:38.544472 git.c:348               trace: built-in: git 'update-index' '-q' '--refresh'
17:04:39.567521 git.c:348               trace: built-in: git 'diff-index' '--quiet' '--cached' 'HEAD' '--ignore-submodules' '--'
17:04:40.578480 git.c:348               trace: built-in: git 'diff-files' '--quiet' '--ignore-submodules'
17:04:41.595078 git.c:348               trace: built-in: git 'update-index' '-q' '--refresh'
17:04:42.612776 git.c:348               trace: built-in: git 'diff-index' '--quiet' '--cached' 'HEAD' '--ignore-submodules' '--'
17:04:43.621067 git.c:348               trace: built-in: git 'diff-files' '--quiet' '--ignore-submodules'
17:04:44.636720 git.c:348               trace: built-in: git 'rev-parse' '--verify' 'HEAD'
17:04:45.642275 git.c:348               trace: built-in: git 'rev-list' '--oneline' '-n' '1' 'HEAD' '--'
17:04:46.648038 git.c:348               trace: built-in: git 'symbolic-ref' '-q' 'HEAD'
17:04:47.653633 git.c:348               trace: built-in: git 'write-tree'
17:04:48.664282 git.c:348               trace: built-in: git 'commit-tree' '<hex_number>' '-p' '<hex_number>'
17:04:49.672125 git.c:348               trace: built-in: git 'read-tree' '--index-output=/Users/<USER>/.git/index.stash.62412' '-m' '<hex_number>'
17:04:50.707740 git.c:348               trace: built-in: git 'diff' '--name-only' '-z' 'HEAD' '--'
17:04:51.737890 git.c:348               trace: built-in: git 'update-index' '-z' '--add' '--remove' '--stdin'
17:04:52.752634 git.c:348               trace: built-in: git 'write-tree'
17:04:53.772245 git.c:348               trace: built-in: git 'commit-tree' '<hex_number>' '-p' '<hex_number>' '-p' '<hex_number>'
17:04:54.778991 git.c:348               trace: built-in: git 'update-ref' '-m' 'WIP on <branch>: <hex_number> <branch> Kept working for a bit' 'refs/stash' '<hex_number>'
Saved working directory and index state WIP on <branch>: <hex_number> <branch> Kept working for a bit
17:04:55.787801 git.c:348               trace: built-in: git 'reset' '--hard'
HEAD is now at <hex_number> <branch> Kept working for a bit

Estoy usando principalmente SourceTree de Atlassian, pero el problema también persiste en la línea de comandos de git (también lo es el registro que mostré). Nuestra fuente para alojar el código son varios repositorios privados pagados en GitHub.

¿Hay algo que pueda intentar para acelerar las operaciones de git? No parece importar qué operación sea, todas son lentas.

Me dijeron que hiciera esta pregunta aquí en lugar de Stack Overflow.

No publiques tus preguntas. Si cree que su pregunta sería mejor aquí, solicite la migración marcando para un moderador.

Respuestas (2)

Ejecutar git gcde vez en cuando para acelerar las cosas (si no lo ha configurado para que se active automáticamente)

He intentado esto, no ha ayudado. De hecho, estoy escribiendo esto ahora porque git está 'escondiendo' algo....
Esto me ayudó dramáticamente. time git log—one-line -n10reportado 1.5 segundos antes. Después, tarda 0,23 segundos. Gracias.

Resulta que la respuesta a esto fue deshabilitar mi software WebRoot. Una vez que se apagó, git INMEDIATAMENTE aceleró a la velocidad esperada.