Unable to update submodule

I want to update my submodule on my local machine to the latest version of the super repository. I am currently

git submodule status 257a40757014ca5a2e8b500d2eb3000cb6628094 common (heads/master) 

I tried git submodule update but didnโ€™t even try to contact the remote machine:

 [submodule "common"] url = ssh://foo.com:22/home/bar/webapps/git/repos/common.git 

what's wrong?

+4
source share
2 answers

You need to make this update from the submodule.
And then go back one level and commit the parent repo.

The update to the git submodule was to ask the parent repo to check if the submodule had content 257a40757 . It was, therefore, there was no connection.

Since a submodule is its own git repository, you need to update this repo first and then write the new updated status of the specified submodule in the parent repo.

+3
source

You need cd to enter the submodule directory and run git pull . Then cd to your super repository and git add [submodule folder] to update the link.

See Git Book - Submodules .

+2
source

All Articles