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

Re: Changing branches in supermodule does not affect submodule?

From: Jens Lehmann <hidden>
Date: 2016-06-15 22:47:32

Peter Krefting schrieb:
If I have a repository with submodules that is in a clean state, and
switch branches in the super repository, the submodules are left in the
state they were in before I switched branches (with 1.6.4, at least). Is
this the expected behaviour?
Yup, submodules have to be updated separatly.

When they are cloned from a remote with "git submodule add" followed by
a "git submodule init", just calling "git submodule update" every time
you want the submodule to be updated according to the state committed
in the superproject will do the trick (but keep in mind that all
referenced commits have to be accessible in the local clone of your
submodule, so you might have to do a fetch there once in a while).


Jens
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help