shallow clones are bad?
shallow clones are bad?
Posted Aug 31, 2026 20:45 UTC (Mon) by jtaylor (subscriber, #91739)Parent article: Ryabitsev: Creepy crawlies
> ... but poorly designed CI systems that try to do something stupid like shallow-clone stable.git from 20 different nodes, all at the same time. (Shallow clones are awful. ...
I expected shallow clones to be better for parties involved as its less data to transfer, that its bad is unexpected and the manpage doesnt mention anything about it.
Best information I found is a vague statement here https://github.blog/open-source/git/get-up-to-speed-with-...
> These clones also put undue stress on later fetches, so they are strongly discouraged for developer use. They are helpful for some build environments where the repository will be deleted after a single build.
Though this also kind of indicates it is ok for the CI use case.
Thinking about it I guess shallow clones may need to unpack old files from pack files which is more costly than just sending the whole pack to the client.
So if I'm not limited by bandwidth or disk space I should always use full clones also for single use?
A mention on the manpage would probably help to avoid this misconception.
