Support Linking Relative URL's on submodules

When browsing a repo that has submodules with relative urls they do not get linked like a submodule with an absolute url does.

I have setup a demo here:

Note that all three submodules point to the same repo, but one uses an absolute url and the others use relative urls.

The aboslute url submodule becomes a clickable link that takes you to the submodule repo, the others do not.

Using relative submodule urls is particularly useful when people on your team use different protocols for git (some git over ssh, some https), as the submodules will be cloned with whatever protocol the parent repo is cloned with.


Hi @apmorton,

Thanks for this feedback! We’re always working to improve GitHub and the GitHub Community Forum, and we consider every suggestion we receive. I’ve logged your feature request in our internal feature request list.

Though I can’t guarantee anything or share a timeline for this, I can tell you that it’s been shared with the appropriate teams for consideration.

Please let me know if you have any other questions.



I also would really like this feature! I would therefore like to add a +1.


+1, Also would like to see a such feature

I know that I have seen this requested from the community for a long time.  It’s actually somewhat baffling to me that what I consider the more “difficult” case (directly links, which could be to different servers) is supported, but the “simpler” case (relative links, which of course are on the same server) are not.

This is actually very important to the usability of submodules for our GitHub Enterprise users, so I’ll give all the +1 that I can to this one…


BTW, another motivation to utilize relative links is to support local servers.  Customers using (and paying for!) GitHub Enterprise Server may have multiple servers on their own premises.  If a submodule URL is relative, it:

  1. Avoids hard-coding a server name that could potentially change

  2. Allows it to always point at “this server”, which is useful if you have separate servers for testing, etc.


I even use


to include independent branches of the same git repository as

git submodule


This is well defined behavior of git

+1 from me too!


I don’t want to hardcode the server URL.

1 Like

+1 for the supporting relative urls in subs

Also, because of this cause, github doesn’t put full sources of a project into Release archives of source code (zip and tar.gz), if the projects contains submodules with relative URLs. This can be very important to comply licenses

CC @andreagriffiths11 

1 Like


I wanted to add that ssh access should work as well, but I think that would be covered by the original post.

1 Like

What is the status of this issue internally? The FreeRTOS project just reverted switching to a relative URL for its submodule due to this issue:

This feature is necessary.

1 Like

In my case relative submodule paths allow me to work transparently on my own repos and my workplace repos using different ssh keys by just aliasing their hosts on the ssh ocnfig file

+1 for relative URL support.

+1 for relative URL support. GitLab has it ;).

+1 for relative URL support! We’d love to be able to see diffs again, after our move to relative urls.


This is a real must-have. Url hard-coding is not a valid workaround.

Hi, can I ask a question in this forum? I did not find out where to write it. I would like to ask how to download zip. There is no more Clone or Download button?
thank you