Dos extremos de un cable
El rendimiento de fetch y push depende de la eficiencia de negociación, tamaño de transferencia y cómputo del lado servidor. Cada uno tiene palancas, y las correctas difieren por tamaño de repo.
Protocolo v2
GIT_TRACE_PACKET=1 git ls-remote origin 2>&1 | head -2
git config protocol.version 2
Algoritmo de negociación
git config fetch.negotiationAlgorithm skipping
git config fetch.negotiationAlgorithm noop
URIs de bundle
git clone --bundle-uri=https://cdn.example/repo.bundle https://example.com/repo.git
git config fetch.bundleURI https://cdn.example/repo.bundle
Fetch paralelo
git config fetch.parallel 0
git config submodule.fetchJobs 8
Optimización de push
git config push.useBitmaps true
git config pack.useBitmaps true
git push --atomic origin main feature
Consideraciones del lado servidor
Los servidores se benefician de MIDX, bitmaps de alcanzabilidad, repack geométrico y commit-graph igual que los clientes.
Clones shallow y partial
git clone --depth=1 https://example.com/repo.git
git clone --filter=blob:none https://example.com/repo.git
git clone --filter=tree:0 --no-checkout https://example.com/repo.git
Errores comunes
Usar --depth=1 en CI luego intentar bisect o log restringido por ruta. Deshabilitar bitmaps en el servidor "por simplicidad."