You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a somewhat common pattern of using monorepos across a variety of orgs, and it's not always necessary (or desirable) to have all of the code checked out for each component. Git allows for sparse checkouts where you can specific files, paths, etc to checkout and track vs. the entire repo.
Describe the Solution You Would Like
I would love for the vcsrepo git type to suppport sparse checkouts. I saw that the feature is enabled for svn currently. The git documentation to use the specific subcommand would require a newer version of git (>= 2.25 iirc), but supports other methods of accomplishing this in earlier versions of the client.
Describe Alternatives You've Considered
We can checkout the full repo as is if needed, but it is undesirable in certain scenarios where multiple applications might share a single repo when they're deployed to different places or in different ways.
Use Case
There is a somewhat common pattern of using monorepos across a variety of orgs, and it's not always necessary (or desirable) to have all of the code checked out for each component. Git allows for sparse checkouts where you can specific files, paths, etc to checkout and track vs. the entire repo.
Describe the Solution You Would Like
I would love for the vcsrepo
git
type to suppport sparse checkouts. I saw that the feature is enabled forsvn
currently. The git documentation to use the specific subcommand would require a newer version of git (>= 2.25 iirc), but supports other methods of accomplishing this in earlier versions of the client.Describe Alternatives You've Considered
We can checkout the full repo as is if needed, but it is undesirable in certain scenarios where multiple applications might share a single repo when they're deployed to different places or in different ways.
Additional Context
Samples:
With a directory structure such as the following:
If I wanted to clone only the python-module directory, I would do the following:
Using Newer Version of Git
Using Older Version of Git
My directory structure would now look like this:
There are a variety of other options obviously and ways to check out root files (--cone vs. --no-cone) , but this is the gist of it
The text was updated successfully, but these errors were encountered: