dolt
dolt copied to clipboard
Shallow clone/Partial Clone
In cases where commit history is unnecessary, it'd be nice to avoid the wasted disk space.
dolt clone --depth 1 <repo> <dest>
From git docs:

We've definitely discussed this and agree it's a good feature to add.
I think shallow clones and partial clones are a bit different features (although with some overlap). It's been discussed in pretty much any version control system implementation that ever existed, and sometimes they call them by different names (narrow clones, slices, etc.), but in the end it's all about the same.
Basically it all boils down to limit the clone in two dimensions: time and space.
So, time is what Git calls shallow clone, which lets you clone the repository without having to clone the full history.
And space, is what Git calls sparse checkout, which lets you checkout (and possible clone) only those parts of the repository that you are interested about. For example only a specific directory (or specific table in Dolt).
Both features are indeed very valuable to have in Dolt.
Do you have any plans, or maybe rough ideas on how could this be implemented in Dolt?
Bumping this. This would be such a time saver for data bounties. These people don't need the history ever.
Shallow clone is implemented:
https://www.dolthub.com/blog/2024-02-21-shallow-clone/
Partial clones are not. Changing the title of this issue to Partial :-)
This issue was asking for shallow clones, maybe would be better to close this one as implemented and create a new one for tracking sparse checkouts?
Good idea.
@burdiyan , we'd love to learn about your Dolt use case sometime. Feel free to join our Discord or shoot me an email if you want to share.