Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Starting with Git 1.7.5 it should update submodules automatically by default like you want it to.</p> <p>[EDIT: per comments: the new 1.7.5 behaviour is to automatically <em>fetch</em> the latest commits for submodules, but <strong>not</strong> to <em>update</em> them (in the <code>git submodule update</code> sense). So the information in this answer is relevant as background, but is not a complete answer by itself. You still need an alias to pull and update submodules in one command.]</p> <p>The default behavior, "on-demand", is to update submodules whenever you fetch a commit that updates the submodule commit, and this commit isn't already located in your local clone.<br> You can also have it updated on every fetch or never (pre-1.7.5 behavior I assume).<br> The config option to change this behavior is <strong><code>fetch.recurseSubmodules</code></strong>.</p> <blockquote> <p>This option can be either set to a boolean value or to <code>on-demand</code>.<br> Setting it to a boolean changes the behavior of <code>fetch</code> and <code>pull</code> to unconditionally recurse into submodules when set to true or to not recurse at all when set to false. </p> <p>When set to <code>on-demand</code> (the default value), <code>fetch</code> and <code>pull</code> <strong>will only recurse into a populated submodule when its superproject retrieves a commit that updates the submodule’s reference</strong>. </p> </blockquote> <p>See:</p> <ul> <li><a href="http://www.kernel.org/pub/software/scm/git/docs/v1.7.5/git-config.html" rel="noreferrer"><code>git config</code> man page (1.7.5)</a> (or latest <a href="http://git-scm.com/docs/git-config" rel="noreferrer"><code>git config</code> man page</a>)</li> <li><a href="http://www.kernel.org/pub/software/scm/git/docs/v1.7.5/git-fetch.html" rel="noreferrer"><code>git fetch</code> man page (1.7.5)</a> (or latest <a href="http://www.kernel.org/pub/software/scm/git/docs/git-fetch.html" rel="noreferrer">git fetch man page</a>)</li> </ul> <p>for more information.</p> <pre><code>git fetch --recurse-submodules[=yes|on-demand|no] </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload