I have many sub -repos, meaning one big umbrella repo that has smaller repos. Now when I do a commit in a leaf repo, it will automatically mean that I get a change in its parents. If you suppose the structure as a binary tree, you may realize it is ridiculous -- having 5 git-repo deep structure could easily mean $ git commit -m 'did 1'; cd ..; git commit -m 'did 1 as mentioned'; ... git commit -m 'did 1 same as earlier'
. How can I avoid this kind of repetitive committing?
Example 1: a graphical example about the problem
X---------|
|
Y---------A --------|
|
B --------|<-----Pictures (graphic designers, animators--have repo)
|
C --------|
A change in Pictures will change A, B, C, X and Y -- bloated commit, 6 commits due to one change, bad repetition! Now people working with Pictures can be totally different people to people doing things with X,Y, A, B and C, making things more obscure.
Example 2: hand-on -example to trial with sub-sub... -repos
Please, copy this hand-on -example here. You can test things there with 3-level -sub-repos.
So far Suggested
The basic submodules in Git, more here.
Gitslave here.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…