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

How to properly rename a repository with submodules

From
GNGelonida N <gelonida@gmail.com>
Date
May 20, 2012, 18:19 UTC
Message-ID
<jpbcjj$ho$1@dough.gmane.org>
Hi,

Today I noticed to my surprise, that a repository with submodules contains absolute paths.in the .git file of each sub module.

This is kind of surprising to me and seems to make it absolutely impossible to have a non bare git repository on a memory stick.

It also seems to make it impossible to rename a working repository after cloning.

So I have three questions.

1.) Is there any way to force git to use relative path names, such, that this issue just disappears.

2,) Is there any existing script, that allows me to move a git repository to another location without breaking it's sub modules.

3.) Why do these path names have to be absolute? Is this for performance reasons? path names relative to the location of the .git file seem to be much more flexible / portable.

Thanks in advance for your answers
Next: Gelonida N
Message 1 of 2 in “How to properly rename a repository with submodules”
  1. Gelonida NMay 20, 2012
  2. Gelonida NMay 20, 2012

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.