0

In this particular case I am trying to get all files from the project

https://github.com/spring-projects/spring-integration-samples/tree/master/basic/amqp

I am on Mac OS with git installed in the shell. So I am trying to construct a git clone command based on How to `git clone` including submodules? or some other similar links. Neither of my command works

Community
  • 1
  • 1
Alex
  • 7,007
  • 18
  • 69
  • 114
  • I tried something like "git clone git://github.com/spring-projects/spring-integration-samples/tree/master/basic/amqp.git" and some others – Alex Nov 13 '15 at 17:30
  • 4
    Use `git clone https://github.com/spring-projects/spring-integration-samples.git`, navigate to the amqp example directory: `cd spring-integration-samples/basic/amqp` – JB Nizet Nov 13 '15 at 17:30
  • Also seeing the git:// prior to your initial point in the comment section. Make sure that if you are not using ssh, you bring in the whole https:// angle or you may get some weird type of errors. Mainly because of the manner that github handles its address space. – L.P. Nov 14 '15 at 02:41

1 Answers1

2

Simply clone it:

git clone https://github.com/spring-projects/spring-integration-samples.git

Then, if it has submodules, get them using:

git submodule update --init

That's all.

You will have the whole project cloned on your machine. If you are interested in a specific subdirectory, simply explore it.

As far as I can see, the directory you are interested in is not a submodule of the project, so downloading the latter and visit the former is a good approach.

EDIT

As suggested in the comment by HBHB, you can do the same even using a single command:

git clone --recursive https://github.com/spring-projects/spring-integration-samples.git
skypjack
  • 49,335
  • 19
  • 95
  • 187
  • 2
    NB: You can do this in one line by adding the `--recursive` flag: `git clone --recursive https://github.com/spring-projects/spring-integration-samples.git` – houtanb Nov 13 '15 at 19:11