git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Git monorepo - recommendation regarding usage of sparse-checkout

From
MLMor, Gil (DXC Luxoft) <gil.mor@dxc.com>
Date
May 30, 2023, 19:26 UTC
Message-ID
<DS7PR01MB758914BD44E20CF8185B7C5BF64B9@DS7PR01MB7589.prod.exchangelabs.com>
Hello, we are experimenting with migrating a large-ish code base from SVN to a Git Monorepo and it would help us if we can get some input regarding the usage of sparse-checkout.
From our timing experiments sparse-checkout is the only method so far that reduces our times to good results.
The only issue might be the Disclaimer that the sparse-checkout feature is experimental, and that the behavior will change.

We have tried Full, Shallow, Blobless, Treeless clones in all combinations and it takes 25-40 minutes for each operation (checkout and branch switching). Sparse checkouts reduce these times to a few minutes to checkout and a few seconds to switch branches for each sub-project/sparse set. Our code base doesn't have binary blobs - only text.

Out of the high level use cases we would say B ("Users want a sparse working tree but are working in a larger whole") fits us. https://git-scm.com/docs/sparse-checkout#_purpose_of_sparse_checkouts

The command is already featured in GitHub and GitLab articles about reducing Monorepos size but we are still not sure how un/stable the feature is or how commonly used the feature is already.
So, we thought we'll write an email to see if we can get a bit more nuanced answer about the safety of real-world usage so that we can make an informed decision whether or not to start using sparse-checkout, despite it being experimental.
We are not looking for 100% assurance, we know the responsibility is eventually totally ours and there are no guarantees, but it seems like a game changer so we are just looking for a bit more information so that we can make a decision.
Best Regards,

Gil Mor SW Developer Cross Industry Solutions

Luxoft A DXC Company

Next: Sean Allred
Message 1 of 3 in “Git monorepo - recommendation regarding usage of sparse-checkout”
  1. Mor, Gil (DXC Luxoft)May 30, 2023
  2. Sean AllredJul 9, 2023
  3. Rudy RigotJul 27, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.