0

We have a repository with a submodule and I'm using SmartGit to pull update and it works perfectly.

My partner is trying to do the same from the command line:

git pull --recurse-submodules

and git returns:

Fetching submodule xxx/yyy
Already up-to-date.

and the submodule is not updated.

When I look at smartgit, it doesn't update the submodules through a single command, but it issues two commands:

~/Projects/xxx> git fetch --progress --prune --recurse-submodules=no origin

~/Projects/xxx/yyy> git fetch --progress --prune --recurse-submodules=no origin

So it updates the main code AND the submodule separately.

How do get everything updated in a single command?

Community
  • 1
  • 1
Thomas
  • 10,933
  • 14
  • 65
  • 136
  • 1
    Generally, a submodule will not have a branch checked out when cloned: it will just point to a commit. So a `pull` would not do anything (nowhere to go from detached HEAD). Also see some of the answers and comments at [Easy way to pull latest of all git submodules](https://stackoverflow.com/q/1030169/1441) – crashmstr Jun 10 '19 at 15:30
  • 1
    Possible duplicate of [Easy way to pull latest of all git submodules](https://stackoverflow.com/questions/1030169/easy-way-to-pull-latest-of-all-git-submodules) – Caleb Jun 10 '19 at 15:44

0 Answers0