Skip to content

rm-training/lab-git-submodules-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Demo / Lab setup

git clone https://github.com/rm-training/lab-git-submodules-starter
cd lab-git-submodules-starter
rm -Rf .git

You'll be left with:

tree
.
├── main-project
│   ├── first
│   └── lib
│       └── module-a
│           ├── file3
│           ├── first
│           └── second
└── simulated-remotes
    ├── module-a
    │   ├── first
    │   └── second
    └── module-b
        └── first

Module Project(s)

For both module-a and module-b:

cd module-a
git init
git add .
git commit -m 'A: First Commit'
git config --local receive.denyCurrentBranch warn

cd module-b
git init
git add .
git commit -m 'B: First Commit'
git config --local receive.denyCurrentBranch warn

Main Project

cd main-project
git init
git add .
git commit -m 'Main: First Commit'

Set the configs:

git config --local submodule.recurse true
git config --local diff.submodule log    
git config --local status.submoduleSummary true

Then add your submodule(s):

git submodule add ../simulated-remotes/module-a lib/module-a

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published