2

I saw this question here, but the question is from 2010 and talks about git version < 2 mostly. And all of the given answers seem to indicate: you can restrict the "current" checkout; but you will always have the full history locally.

The later thing is my problem. We just moved from SVN to git for our main repository; and the .git has some 8, 9 GB (a lot of history, and a lot of huge files).

But: one tiny directory in that huge repository is a small python tool (lets call it PX) that I own and use daily.

Before moving the backend to git, it would simply use git-svn, twice: a full checkout of the huge repository containing everything (for my real development work); and a sparse checkout containing only PX.

Now I am wondering if git 2.95 in 2016 would provides any option to use git as I used git-svn before. Meaning - having a working git for PX, but PX only.

Community
  • 1
  • 1
GhostCat
  • 137,827
  • 25
  • 176
  • 248
  • This is all theoretical (as in I have not tried it myself), but there's no reason that you cannot combine sparse checkouts with shallow clones. However, depending on your situation, if you need a full repository copy somewhere you might as well use either `add-worktree` or a reference clone. – torek Aug 29 '16 at 07:25
  • look to git subtree. http://blogs.atlassian.com/2013/05/alternatives-to-git-submodule-git-subtree/ – g19fanatic Aug 29 '16 at 12:57

0 Answers0