2 ms·
Git supports this scenario as "sparse checkouts": https://git-scm.com/docs/git-read-tree https://git-scm.com/docs/git-read-tree - see this QA: https://stackover
by DaiPlusPlus 9y ago
Git supports this scenario as "sparse checkouts": https://git-scm.com/docs/git-read-tree https://git-scm.com/docs/git-read-tree - see this QA: https://stackoverflow.com/questions/4114887/is-it-possible-to-do-a-sparse-checkout-without-checking-out-the-whole-repository https://stackoverflow.com/questions/4114887/is-it-possible-t...
- hinkley 9y agoDoes this allow you to file PRs against the repository you have checked out? Or does this only work for read-only use? What about CI? How do you convince TC or Jenkins or Bamboo to do the same thing? If this does do all that, I think this functionality needs some SEO love because this pretty much never comes up when I search for the latest ways to grab part of a repo. All I find are conversations where people are trumpeting the wrong tools for the job. Edit: Also, this doesn't seem to let me check out a subtree the way people mean "check out a subtree". When I check out 'just foo/bar/baz' I expect to have a directory called baz as my project root. Not a directory named foo with a single grandchild named baz.
- foxhill 9y agoperhaps you could rename the repo to something else/move it somewhere else, then ln -s the grandchild, if that’s important?
- hinkley 9y agoIt breaks down if you need more than a couple of them. But I guess hat could go both ways. A problem we saw with perforce and the clientspec: when people see a directory structure, they forget they don’t have all the bits. They make errors of judgment based on bad info.