/docs/MyDocs

To get this branch, use:
bzr branch http://darksoft.org/webbzr/docs/MyDocs

« back to all changes in this revision

Viewing changes to SCM/rcs/git/git_modules.txt

  • Committer: Suren A. Chilingaryan
  • Date: 2017-04-03 02:45:17 UTC
  • Revision ID: csa@suren.me-20170403024517-dwzj0z0k1cmhxm7u
Restructuring, OpenShift, Ansible, Git

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Submodules
 
2
----------
 
3
 The submodules are git-repo within the git-repo.
 
4
 
 
5
 - Add the submodule:
 
6
    git submodule add <new-remote-repo> <path/name>
 
7
 
 
8
    * This generates '.gitmodules' file with configuration. When committing, only this file will go
 
9
    into the repository.
 
10
    * In the submodule directory you can checkout the required revision. It will be stored in the
 
11
    repository and always restored.
 
12
 
 
13
 - Selecting the branch
 
14
    git config -f .gitmodules submodule.<submodule>.branch <branch>     - Unless -f specified, the local change only will be made
 
15
    
 
16
 - Request submodule information on the status, diff, etc.
 
17
    git config status.submodulesummary 1
 
18
    git config --global diff.submodule log
 
19
    
 
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
 
24
    
 
25
 - Workign with multiple submodules
 
26
    git submodule foreach 'git ...'
 
27
 
 
28
    
 
29
 
 
30