How to update the git submodule?
I have 2 projects. “
MyProg” and “
Both projects are on Bitbucket.
One project is submodule to the second. The problem is that when I pull changes in the main project, the changes submodule are not pulled.
- How do I manage conflicts with git submodules?
- Checking out only a subdirectory of another repo with git-submodule
- Adding a git submodule inside of a submodule (nested submodules)
- Selective checkout
- Git will not init/sync/update new submodules
- Git Submodule update over https
Perhaps it should be, or did I do something wrong?
How do I do that when you upgrade one project and pull the second project’s change?
One Solution collect form web for “How to update the git submodule?”
The problem is that when I pull changes in the main project, the changes submodule not pull
Don’t forget that a submodule is a fixed reference to a SHA1: it is a gitlink, a special entry in the index.
It doesn’t move unless you have configured that submodule to follow a branch.
(See “git submodule tracking latest” and “Git submodule new version update”)
In that case, this would update it:
git submodule update --init --remote
Don’t forget to add, commit and push (in the parent repo) the new reference if the submodule was updated to a more recent SHA1.