-5

I have a typical ruby project and I would like to include a submodule within that project. The submodule lives on github. How do I use the git submodule command to include the submodule in my projects vender/plugins directory?

Thanks.

Zoe
  • 27,060
  • 21
  • 118
  • 148
JZ.
  • 21,147
  • 32
  • 115
  • 192
  • 2
    -1: **"This question does not show any research effort"**. Did you try `git submodule --help`? This is the most basic possible usage of the submodule command, and you should be able to answer this yourself with even the smallest amount of effort. – user229044 Dec 13 '11 at 18:35

2 Answers2

0

From git submodule --help we can see:

git submodule [--quiet] add [-b branch] [-f|--force]
              [--reference <repository>] [--] <repository> [<path>]

So, given a repository "my-plugin" at "git@github.com:my-user/my-plugin.git", you would use

git submodule add git@github.com/my-user/my-plugin.git vendor/plugins/my-plugin
user229044
  • 232,980
  • 40
  • 330
  • 338
0
 git submodule add (url of repo) vender/plugins/(submodule name)

Pro Git is a good reference for common git commands