Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Submodule not showing up in repo

Tags:

git

github

rpm

I am building some custom rpm packages, and am trying to include the source of another project as a submodule to build from. During my first run I added the package and when I looked at the Github page I could see the icon showing the linked submodule, but it was in the wrong place.

I did some changes to place the submodule where I need it (in a /SOURCES folder) but when I commit or try to do anything to update the repo I am not seeing anything which indicates the submodule is loading in the correct place.
I also don't see any changes when using submodule update or any other related command.

Should I just erase the .gitmodules file and start over? I am worried that will have unforeseen consequences. Is there any command to tell git to check the .gitmodules file and take action accordingly?

Thanks for any help.

like image 933
eignhpants Avatar asked Jun 29 '15 13:06

eignhpants


1 Answers

I found a solution to this for anyone else who may stumble into this thread. After messing around with updating I ended up adding the submodule again with git submodule add --force <url> <path>. The --force option was necessary because git was seeing another module with the same name. Somehow this link was broken and not updating. After this step running git submodule update, the directory was populated and a link appeared in the github page signifying the change.

I found this information in the following link:

Link

like image 101
eignhpants Avatar answered Sep 28 '22 01:09

eignhpants