git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Shriramana Sharma <samjnaa@gmail.com>
To: git@vger.kernel.org
Subject: need for `git submodule update` over `git pull --recurse-submodules`?
Date: Mon, 18 Jun 2018 09:11:11 +0530	[thread overview]
Message-ID: <CAH-HCWW2xUqO9HNfzaduXbn1PnwWinVJcTh9AG3Ubmq0LtAQLg@mail.gmail.com> (raw)

Hello.

I've read [this similar question on
superuser](https://superuser.com/questions/852019/git-submodule-foreach-git-pull-origin-master-vs-git-pull-recursive-submodules)
but I feel my question is more basic:

From the `git pull` manpage:

    git pull runs git fetch with the given parameters and calls git
merge to merge the retrieved branch heads into the current branch.

    ...

    --[no-]recurse-submodules[=yes|on-demand|no]

    This option controls if new commits of all populated submodules
should be fetched and updated, too.

To keep a cloned repo without submodules up to date I have been using
just `git pull`. From the above it seems that I just need to add
`--recurse-submodules` to pull all submodules as well.

But if so what is the use of `git submodule update --recursive` or
`git submodule update --remote --rebase` or such, which is somewhat
confusing to me I'm sorry to say.

Do I need to execute any `git submodule` commands separately even if I
do `git pull --recurse-submodules`? All I want is to stay in sync with
the cloned repo.

-- 
Shriramana Sharma ஶ்ரீரமணஶர்மா श्रीरमणशर्मा 𑀰𑁆𑀭𑀻𑀭𑀫𑀡𑀰𑀭𑁆𑀫𑀸

             reply	other threads:[~2018-06-18  3:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-18  3:41 Shriramana Sharma [this message]
2018-06-18 17:44 ` need for `git submodule update` over `git pull --recurse-submodules`? Stefan Beller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAH-HCWW2xUqO9HNfzaduXbn1PnwWinVJcTh9AG3Ubmq0LtAQLg@mail.gmail.com \
    --to=samjnaa@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).