From: Jens Lehmann <Jens.Lehmann@web.de>
To: Peter Krefting <peter@softwolves.pp.se>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Changing branches in supermodule does not affect submodule?
Date: Tue, 13 Oct 2009 15:11:01 +0200 [thread overview]
Message-ID: <4AD47C65.5080904@web.de> (raw)
In-Reply-To: <alpine.DEB.2.00.0910131115160.14223@ds9.cixit.se>
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
next prev parent reply other threads:[~2009-10-13 13:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-13 10:29 Changing branches in supermodule does not affect submodule? Peter Krefting
2009-10-13 13:11 ` Jens Lehmann [this message]
2009-10-14 6:31 ` Peter Krefting
2009-10-14 15:39 ` Jens Lehmann
2009-10-14 20:12 ` [RFC PATCH] implement sample post-checkout hook to checkout new/unchanged submodules Heiko Voigt
2009-10-14 20:02 ` Changing branches in supermodule does not affect submodule? Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AD47C65.5080904@web.de \
--to=jens.lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=peter@softwolves.pp.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).