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

Re: [New Feature] git-submodule-move - Easily move submodules

From
Jens Lehmann <jens.lehmann@web.de>
Date
Feb 4, 2013, 20:14 UTC
Message-ID
<511016A7.7010005@web.de>
In-Reply-To
<510EE661.8060600@iam.tj>
Am 03.02.2013 23:36, schrieb TJ:
Show 11 quoted lines
> I've recently had need to re-arrange more than ten submodules within a project and discovered there is apparently no easy way to do it.
> 
> Using some suggestions I found on Stack Overflow I eventually figured out the steps required. Because the steps can be
> complex I thought it would be handy to have a tool to automate the functionality.
> 
> I have put together a reasonably bullet-proof shell script "git-submodule-move" that does the job pretty well. I've put it through quite a bit of testing and trusted it with my own project and it has
> performed well.
> 
> I've published to github so others can use and improve it.
> 
> https://github.com/iam-TJ/git-submodule-move
I'd propose to drop these two steps:
 updating super-repository's submodule name
 moving super-repository's submodule repository

Changing the name makes the moved submodule a completely new entity and will lead to a reclone of the repository as soon as recursive checkout materializes. And Trevor already mentioned the long term solution which is to teach "git mv" to do all that, which is next on my list.

Previous: W. Trevor King
Message 3 of 3 in “[New Feature] git-submodule-move - Easily move submodules”
  1. TJFeb 3, 2013
  2. W. Trevor KingFeb 3, 2013
  3. Jens LehmannFeb 4, 2013

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.