{"thread":{"id":"48725","subject":"need for `git submodule update` over `git pull --recurse-submodules`?","startedAt":"2018-06-18T03:41:16Z","lastAt":"2018-06-18T17:44:59Z","messageCount":2,"participants":["Shriramana Sharma","Stefan Beller"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"350369","messageId":"CAH-HCWW2xUqO9HNfzaduXbn1PnwWinVJcTh9AG3Ubmq0LtAQLg@mail.gmail.com","threadId":"48725","inReplyTo":null,"subject":"need for `git submodule update` over `git pull --recurse-submodules`?","fromName":"Shriramana Sharma","fromEmail":"samjnaa@gmail.com","sentAt":"2018-06-18T03:41:11Z","receivedAt":"2018-06-18T03:41:16Z","isPatch":false,"sender":{"key":"samjnaa@gmail.com","avatar":null},"body":"Hello.\n\nI've read [this similar question on\nsuperuser](https://superuser.com/questions/852019/git-submodule-foreach-git-pull-origin-master-vs-git-pull-recursive-submodules)\nbut I feel my question is more basic:\n\nFrom the `git pull` manpage:\n\n    git pull runs git fetch with the given parameters and calls git\nmerge to merge the retrieved branch heads into the current branch.\n\n    ...\n\n    --[no-]recurse-submodules[=yes|on-demand|no]\n\n    This option controls if new commits of all populated submodules\nshould be fetched and updated, too.\n\nTo keep a cloned repo without submodules up to date I have been using\njust `git pull`. From the above it seems that I just need to add\n`--recurse-submodules` to pull all submodules as well.\n\nBut if so what is the use of `git submodule update --recursive` or\n`git submodule update --remote --rebase` or such, which is somewhat\nconfusing to me I'm sorry to say.\n\nDo I need to execute any `git submodule` commands separately even if I\ndo `git pull --recurse-submodules`? All I want is to stay in sync with\nthe cloned repo.\n\n-- \nShriramana Sharma ஶ்ரீரமணஶர்மா श्रीरमणशर्मा 𑀰𑁆𑀭𑀻𑀭𑀫𑀡𑀰𑀭𑁆𑀫𑀸\n"},{"id":"350403","messageId":"CAGZ79kakxmiePTybKbdgqGhgboeWFJeN4pmGHbqNorHYmf9QvQ@mail.gmail.com","threadId":"48725","inReplyTo":"CAH-HCWW2xUqO9HNfzaduXbn1PnwWinVJcTh9AG3Ubmq0LtAQLg@mail.gmail.com","subject":"Re: need for `git submodule update` over `git pull --recurse-submodules`?","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2018-06-18T17:44:42Z","receivedAt":"2018-06-18T17:44:59Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Sun, Jun 17, 2018 at 8:41 PM Shriramana Sharma <samjnaa@gmail.com> wrote:\n\n> Do I need to execute any `git submodule` commands separately even if I\n> do `git pull --recurse-submodules`?\n\nIdeally you don't need \"git submodule\" commands any more, the rest of git\nis slowly converging to have builtin submodule functionality.\n\n> All I want is to stay in sync with\n> the cloned repo.\n\nThat should just work with \"pull --recurse\"\n\n> But if so what is the use of `git submodule update --recursive` or\n> `git submodule update --remote --rebase` or such, which is somewhat\n> confusing to me I'm sorry to say.\n\nThe git-submodule command was the first command implemented that\ndealt with submodules. In the beginning there was no \"git pull --recurse\"\nbut the only way was to run \"git submodule update\" to change\nthe state of submodules. Now there are better ways to do that, such as\nthe recursive pull.\n\nHope that helps,\nStefan\n"}]}