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

git config submodule.<name>.url cannot be a relative URL not sufficiently documented

From
WGWilson, Chris G <chris.wilson@tsc.com>
Date
May 23, 2025, 19:17 UTC
Message-ID
<PH1P110MB1153A29A736A5EF7F3DCD0F59C98A@PH1P110MB1153.NAMP110.PROD.OUTLOOK.COM>
Git Team:
Thank you for all the work you've done. 
We recently ran into an issue where we needed to modify the URLs of some submodules in repository as specified in the .gitmodules file from an absolute URL to a relative one for a CI/CD system. With a desire to leave the original repository completely untouched, we played around with using git config submodule.<name>.url to update to a relative URL. As you probably already can determine, this didn't work. We ended up having to sed the .gitmodules file in place. 

I propose an update to the documentation for git config (as I found in https://git-scm.com/docs/git-config) to specify that submodule.<name>.url must be an absolute URL and cannot be a relative URL (or will be treated as a relative path on the filesystem). Alternatively, an option in git config (or maybe git submodule?) to treat the provided URL as behaved in .gitmodules would also be appreciated.

Thank you for your time. 

Sincerely, Chris Wilson

Message 1 of 1 in “git config submodule.<name>.url cannot be a relative URL not sufficiently documented”
  1. Wilson, Chris GMay 23, 2025

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.