2016-03-29 21:08:18 +01:00
|
|
|
# git submodule
|
|
|
|
|
|
|
|
> Inspects, updates and manages submodules.
|
2019-01-30 11:19:23 +00:00
|
|
|
> Homepage: <https://git-scm.com/docs/git-submodule>.
|
2016-03-29 21:08:18 +01:00
|
|
|
|
|
|
|
- Install a repository's specified submodules:
|
|
|
|
|
|
|
|
`git submodule update --init --recursive`
|
|
|
|
|
|
|
|
- Add a git repository as a submodule:
|
|
|
|
|
2016-09-21 16:35:46 +01:00
|
|
|
`git submodule add {{repository_url}}`
|
2016-03-29 21:08:18 +01:00
|
|
|
|
2017-12-28 08:02:51 +00:00
|
|
|
- Add a git repository as a submodule at the specified directory:
|
|
|
|
|
2017-12-29 07:47:25 +00:00
|
|
|
`git submodule add {{repository_url}} {{path/to/directory}}`
|
2017-12-28 08:02:51 +00:00
|
|
|
|
2016-03-29 21:08:18 +01:00
|
|
|
- Update every submodule to its latest commit:
|
|
|
|
|
|
|
|
`git submodule foreach git pull`
|