Git Submodule Update Not Functioning
I have a repository with various nested submodules. Committing and pushing works pretty well and the changes are visible at GitHub as expected.
In the testing/production environments, new releases of this project are being deployed using these commands:
git pull --recurse-submodules git submodule update --init --recursive
But this only updates the root project, none of the submodules are updated to the commits associated with the HEAD at GitHub. So far the only way I have found to update the whole project is to run
git pull inside each individual submodule folder.
I understand that
git submodule update is the method referenced in most places, but it is not really producing any results in this case. What could be the cause?
You need to make sure your submodules are following a branch, or they will only be checked out at a specific SHA1 (not at the latest of a branch, but the special entry of the index of your parent repo)
See "Git submodules: Specify a branch/tag" in order to make your submodule follow a branch.
git submodule update --init --recursive --remote would be enough to check out the latest from that branch.
- → Authenticate with a cookie using laravel 5.1 and jwt
- → Finding a specific GitLab tag from PHP
- → React: How to publish page on server using React-starter-kit
- → babel-loader, webpack, ES2015 modules: "Element type is invalid"
- → Create a function-attribute of a function, which is, in its turn, a method of an object literal
- → Model Validation in laravel 5.1 not working
- → GIT fatal: loose object
- → Laravel validation required rule not working
- → Axios array map callback
- → Where does this `webpack://` come from for `webpack-dev-middleware`?
- → error when trying to modify project in laravel forge
- → GitHub Pages and Jekyll content duplication and SEO issues
- → Use Laravel repositories with Datatables