My workplace recently switched to git and the powers that be set up components that are shared between projects as submodules, which causes widespread frustration among the people that are trying to figure out how to work with them.
After reading some Internet advice, I pull the project and submodules as follows:
git pull --recurse-submodules
git submodule update --recursive --remote --init --merge
However, sometimes checking the status of the submodules gives me something like:
> git status
On branch feature
Your branch is behind 'origin/feature' by 1 commit, and can be fast-forwarded.
(use "git pull" to update your local branch)
nothing to commit, working directory clean
which is resolved if I do
git submodule foreach git pull
I am at a loss. Can you please tell me what I am doing wrong?
Thank you!