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

Re: Moving (renaming) submodules, recipe/script

From
W. Trevor King <wking@tremily.us>
Date
Feb 3, 2013, 23:38 UTC
Message-ID
<20130203233818.GB30520@odin.tremily.us>
In-Reply-To
<510EE661.8060600@iam.tj>
On Sun, Feb 03, 2013 at 10:36:17PM +0000, TJ wrote:
> 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.

I ran into a similar problem last month, and wrote a similar script [1] ;). There are a few other related threads you might be interested in:

On Sun, Jan 06, 2013 at 07:36:03PM -0500, W. Trevor King wrote:
Show 11 quoted lines
> Today I had to move my first submodule, and I discovered that Git's
> support for this is pretty limited.  There have been a few patch
> series attempting to address this [1,2], but none of them seems to
> have pushed through into master (although I can't put my finger on a
> reason for why).  There are also some SO postings discussing this
> [3,4].  It would be nice if `git mv` worked out of the box on
> …
> [1]: http://thread.gmane.org/gmane.comp.version-control.git/88720
> [2]: http://thread.gmane.org/gmane.comp.version-control.git/143250
> [4]: http://stackoverflow.com/questions/4323558/moving-submodules-with-git
> [3]: http://stackoverflow.com/questions/4604486/how-do-i-move-an-existing-git-submodule-within-a-git-repository
The long-term solution is probably Jens' branch:
On Mon, Jan 07, 2013 at 07:59:53AM +0100, Jens Lehmann wrote:
Show 5 quoted lines
> I´m currently working on teaching mv to move submodules and intend
> to send those patches to the list after finishing submodule deinit.
> Please see
>   https://github.com/jlehmann/git-submod-enhancements/commits/mv-submodules
> for the current state of this series.

Cheers, Trevor

[1]: http://thread.gmane.org/gmane.comp.version-control.git/212861
-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
Previous: TJNext: Jens Lehmann
Message 2 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.