0

I am pretty new to GitHub. I need to check out several packages of code to build my system, most of them are on SVN. However, there is one which is on GitHub. Within this there is a submodule inside it.
My question is how to check out this submodule by using svn co ...

I list all components by editing

svn propedit svn:externals

Among them one is on GitHub. I can check out all components except that submodule.

Thanks Jim

Zoe
  • 27,060
  • 21
  • 118
  • 148
Jim
  • 11
  • 2

2 Answers2

1

This works for me:

svn checkout https://github.com/user/repo
Zoe
  • 27,060
  • 21
  • 118
  • 148
Edu
  • 11
  • 1
  • Some short explanation would be helpful here. – MrLeeh Apr 27 '18 at 10:51
  • I think I misunderstood your question. The command I mentioned is to clone the whole repo. For just a part of it, I don't know. Try checking [this](https://unix.stackexchange.com/questions/233327/is-it-possible-to-clone-only-part-of-a-git-project) – Edu Apr 28 '18 at 12:09
0

You need to use git, not svn. Git and Subversion (SVN) are fundamentally different; Here's a pretty good explanation, and here's some pretty good documentation.

The command you will want is:

git clone <url>

Where URL is the URL give when you hit the 'Clone or Download' button shown when you browse to the repository in Github.

Community
  • 1
  • 1
Liam M
  • 5,306
  • 4
  • 39
  • 55
  • Thanks, but my requirement is to build the system in one shot by doing "svn co .....". At this time I can checkout the solid part of code in github by "svn co ....", but the submodule can't be checkout. I think this is because submodule is a link, rather than solid body. So I am looking for help to see if anyone had this kind of problem before. This is the situation I am facing. -- Jim – Jim Feb 15 '17 at 00:22
  • @Jim perhaps [this](https://help.github.com/articles/support-for-subversion-clients/) addresses your need? I gather that you want to checkout a directory using `svn` from GitHub, which can be done using the link and AFAIK usual SVN practices. If this isn't sufficient then you'll need to explain why before I can offer much else :). – Liam M Feb 15 '17 at 04:07
  • Liam: Say I have a git repository xyz, inside this it has directory a, b, and c. Note c is a submodule. If I do "svn co https://gitgub.com/..../xyz", I can only check out directories a and b, not c. This is my situation. I can checkout them using git command but my work requires me to use svn to check out this. Thanks. -- Jim – Jim Feb 15 '17 at 15:37