Thread (3 messages) flat view 3 messages, 2 authors, 2016-06-15

Re: cloning submodules with children submodules

From: Paul Martinolich <hidden>
Date: 2016-06-15 22:43:53

On Nov 23, 2007, at 1:49 PM, Sven Verdoolaege wrote:
You didn't commit the change to mod_B to proj_one.
Furthermore, you didn't push your changes to mod_B to
the repo you specified for mod_B in .gitmodules.
Thanks for the help.

It works with the changes below.

Paul

I changed the creation of mod_b under mod_B to:

#  add mod_b to mod_B and push the changes back to mod_B

cd $GITDIR/proj_one/mod_B
git submodule add $GITDIR/modules/mod_b
git commit -m 'add module mod_b under module mod_B for project proj_one'
git push

cd $GITDIR/proj_one
git add mod_B
git commit -m 'reflect module mod_B update for project proj_one'
git status

and when I cloned it to:

#  clone the proj_one project (user user_a)

mkdir -p $GITDIR/user_a
cd $GITDIR/user_a
git clone $GITDIR/proj_one
cd $GITDIR/user_a/proj_one

#  get mod_A and mod_B

git submodule init
git submodule update

#  now get mod_b in mod_B

cd mod_B
git submodule init
git submodule update
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help