git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git submodule sync / git submodule rm

From
BHBoettger, Heiko <heiko.boettger@karlstorz.com>
Date
Nov 11, 2015, 10:18 UTC
Message-ID
<8C0042D8869AEA4AA334B49AFBBCEF8294713B41@TUT-EX02-PV.KSTG.corp>
Hi,

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
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
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.
Heiko Böttger

STORZ Endoskop Produktions GmbH Niederlassung Schaffhausen Schneckenackerstr. 1 8200 Schaffhausen Switzerland

----------------------------------------------------------------------------------------------------------------- We would be most pleased to welcome you to MEDICA 2015 in Düsseldorf, Germany, 16th - 19th November 2015. You will find us in hall 10 booth D22. -----------------------------------------------------------------------------------------------------------------

Next: Jens Lehmann
Message 1 of 2 in “git submodule sync / git submodule rm”
  1. Boettger, HeikoNov 11, 2015
  2. Jens LehmannNov 11, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.