Monday, February 21, 2011

In SVN you can check out a portion of the file structure, can you do the same in GIT

In SVN you can checkout a portion of a repository ie:

http://some-url.com/repo/app1/trunk/plugins/plugin1

Can you do the same when you git clone? As I cannot get this to work

Thanks

From stackoverflow
  • No. When you clone, you get the whole repository. In Git, a repository is viewed as a contiguous element that shouldn't be split up any further. If people frequently need to get only "part" of the repository, the Git way of thinking suggests that it should be split off, and you should consider using submodules instead.

    Piper : thanks to everyone for the reply but the link was very useful to understanding why I cant do a partial checkout in git - thanks to all
    Piper : I have just recently converted an old company svn repo which has a bunch of projects. from within this git repo how would you recommend creating a submodule of a particular project
  • No you cannot, git treats the entire repository as a unit and must be checked out in its entirety.

0 comments:

Post a Comment