From: Jens Lehmann <Jens.Lehmann@web.de>
To: "Boettger, Heiko" <Heiko.Boettger@karlstorz.com>,
"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: git submodule sync / git submodule rm
Date: Wed, 11 Nov 2015 21:02:32 +0100 [thread overview]
Message-ID: <56439ED8.2030705@web.de> (raw)
In-Reply-To: <8C0042D8869AEA4AA334B49AFBBCEF8294713B41@TUT-EX02-PV.KSTG.corp>
Am 11.11.2015 um 11:18 schrieb Boettger, Heiko:
> i'm currently on a migration from svn to git and also have the task to convert the svnexternal to git submodules. During the migration step I am doing an automatic verification which needs a reliable way to switch the working tree to another branch include the submodules.
> When the submodule definition changes I miss a reliable command to update the .git/config:
>
> 1. the git submodule sync seems to do nothing if a module was removed
That's on purpose. In case you check out an older commit which still
contains the submodule in the superproject later the old config is
active again.
> 2. git submodule update complains about the missing entry in .gitmodules
> 3. git submodule deinit doesn't work either and complains about missing path in .gitmodules as well
Not sure what you are talking about here, what exactly did you do to
get into this situation? I assume you just removed the submodule entry
from .gitmodules but did not remove it from the index?
> These issues are partially described in the git book under https://git-scm.com/book/en/v2/Git-Tools-Submodules in section "Issues with Submodules". Now what I am really missing is a way to keep the .git/config and references in sync with the .gitmodules file which at best is integrated into git checkout. It is clear that I could write a script for that by myself, but it would be much better to have an integrated command for that which I though is git submodule sync, but unfortunately it doesn't do a complete sync of all settings.
>
> In the google forum there was someone asking for a git submodule remove command:
>
> https://groups.google.com/forum/#!searchin/git-users/submodule/git-users/Md72iVvPHqw/H_j3mT7bRq4J
>
> I don't think that it is strictly required to remove the untracked file, this can be archived by a git clean as well, but is there any progress on this.
Did you check "git rm <submodule>"? ;-)
prev parent reply other threads:[~2015-11-11 20:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-11 10:18 git submodule sync / git submodule rm Boettger, Heiko
2015-11-11 20:02 ` Jens Lehmann [this message]
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=56439ED8.2030705@web.de \
--to=jens.lehmann@web.de \
--cc=Heiko.Boettger@karlstorz.com \
--cc=git@vger.kernel.org \
/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).