3
The submodules are git-repo within the git-repo.
6
git submodule add <new-remote-repo> <path/name>
8
* This generates '.gitmodules' file with configuration. When committing, only this file will go
10
* In the submodule directory you can checkout the required revision. It will be stored in the
11
repository and always restored.
13
- Selecting the branch
14
git config -f .gitmodules submodule.<submodule>.branch <branch> - Unless -f specified, the local change only will be made
16
- Request submodule information on the status, diff, etc.
17
git config status.submodulesummary 1
18
git config --global diff.submodule log
20
- Workign with submodules
21
git submodule init - Registers submodule
22
git submodule update - Fetches the submodule
23
git submodule update --remote - Update the submodule
25
- Workign with multiple submodules
26
git submodule foreach 'git ...'