git submodule update --remote does not work
<p>I cloned a git repository, <code>mainrepo</code>, which has a submodule <code>submodule1</code>. When I try to get the latest update from <code>submodule1</code>:</p>

<pre><code>$ cd mainrepo

$ git submodule add git@bitbucket.org:myaccount/submodule1.git

$ git submodule update --remote submodule1
Usage: git submodule [--quiet] add [-b branch] [--reference &lt;repository&gt;] [--] &lt;repository&gt; [&lt;path&gt;]
   or: git submodule [--quiet] status [--cached] [--recursive] [--] [&lt;path&gt;...]
   or: git submodule [--quiet] init [--] [&lt;path&gt;...]
   or: git submodule [--quiet] update [--init] [-N|--no-fetch] [--rebase] [--reference &lt;repository&gt;] [--merge] [--recursive] [--] [&lt;path&gt;...]
   or: git submodule [--quiet] summary [--cached|--files] [--summary-limit &lt;n&gt;] [commit] [--] [&lt;path&gt;...]
   or: git submodule [--quiet] foreach [--recursive] &lt;command&gt;
   or: git submodule [--quiet] sync [--] [&lt;path&gt;...]

$ git submodule update --remote
Usage: git submodule [--quiet] add [-b branch] [--reference &lt;repository&gt;] [--] &lt;repository&gt; [&lt;path&gt;]
   or: git submodule [--quiet] status [--cached] [--recursive] [--] [&lt;path&gt;...]
   or: git submodule [--quiet] init [--] [&lt;path&gt;...]
   or: git submodule [--quiet] update [--init] [-N|--no-fetch] [--rebase] [--reference &lt;repository&gt;] [--merge] [--recursive] [--] [&lt;path&gt;...]
   or: git submodule [--quiet] summary [--cached|--files] [--summary-limit &lt;n&gt;] [commit] [--] [&lt;path&gt;...]
   or: git submodule [--quiet] foreach [--recursive] &lt;command&gt;
   or: git submodule [--quiet] sync [--] [&lt;path&gt;...]
</code></pre>

<p>I am sure I once tried updating a <code>submodules</code> this way, the docs says to do so too, yet I do not understand why it does not work.</p>

<p>But if I do a fetch and merge directly in the <code>submodule</code>, it gets updated to the latest repository commit as I want it:</p>

<pre><code>$ cd submodule1

$ git fetch &amp;&amp; git merge master
</code></pre>

<p>Why doesn't the <code>submodule update --remote submodule1</code> command work?</p>

<p>Maybe that might help:</p>

<pre><code>$ vim mainrepo/.git/config
[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
[remote "origin"]
        fetch = +refs/heads/*:refs/remotes/origin/*
        url = git@bitbucket.org:myaccount/mainrepo.git
[branch "master"]
        remote = origin
        merge = refs/heads/master
[submodule "local/src/utils"]
        url = git@bitbucket.org:myaccount/submodule1.git

$ vim .gitmodules
[submodule "submodule1"]
        path = submodule1
        url = git@bitbucket.org:myaccount/submodule1.git
</code></pre>