I am trying to clone part of a repo. I saw some posts regarding filtering and it looks like it should be possible to filter a clone and be able to push from the shallow repo with the latest versions of git. I have a misc repo that contains several small projects and would like the ability to only deal with one or two at a time. Say I have a directory in the root of the repo named matrix, would this be the correct syntax to clone part of it?
git clone url --filter=sparse:path=matrix
I got an error "filtering not recognized by server, ignoring" and guess that may be regarding bitbucket, right?
Thanks!
--filter
option forclone
? I'm not aware of it, and don't see it in the docs. I can say (and this may be the answer to your question, but I'm not sure yet) that cloning only certain paths is not possible based on how git stores data, and that this is one of the reasons monorepos are not, IMO, as good an idea as people have started thinking they are. – Endurable