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.
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.
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
git submodule add (url of repo) vender/plugins/(submodule name)
Pro Git is a good reference for common git commands