A gitlab project at contain submodule and both the project and submodule also contain a readme.md file. The readme.md of the top project is given
Top Readme.md
=============
[Link to folder](folder)
[Link to submodule folder](sub)
[Link to submodule Readme.md](sub/README.md)
The first link work as the brower opens at the subfolder but the other two link does not work, I get a page not found message.
How do you create links to files in a submodule as well as to the submodule as is self?
Try instead to use the full https URL (https://gitlab.com/JohanVdBerg/doc-submodule) for the sub
or sub/README.md
file.
Your main repo only includes a reference (called gitlink) to the submodule, not the file itself.
The OP adds:
it is needed to point to the branch to which the submodule points to
Then the URLs would be:
sub
: https://gitlab.com/JohanVdBerg/doc-submodule/tree/<abranch>
https://gitlab.com/JohanVdBerg/doc-submodule/blob/<abranch>/README.md
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With