title: Use different git submodule URL's on different machines
body: <p>Is there any way to use one submodule URL when on one machine, but use a different submodule URL when on the other?</p>
  
  <p>Let's assume I have one machine which has authenticated SSH access to a git repository on a central server and another machine which does not have access to that server. On the authenticated machine I have used <code>git-daemon</code> to share the repositories to my non-authenticated machine.</p>
  
  <p>The problem here is that the repository I've cloned has several submodule dependencies, all of which are repositories on the server that requires authenticated SSH access. In this case, I also have all of the submodules stored on my authenticated machine, so I can simply update the .gitmodules file from:</p>
  
  <pre><code>[submodule "@sub-a"]
      url = ssh://&lt;authenticated-url&gt;/&lt;repo&gt;
      branch = master
  </code></pre>
  
  <p>to...</p>
  
  <pre><code>[submodule "@sub-a"]
      url = git://&lt;ip-of-authenticated-machine&gt;/&lt;repo&gt;
      branch = master
  </code></pre>
  
  <p>Then running <code>git submodule sync</code> and <code>git submodule update --init -r</code> will fetch the submodules directly from my authenticated machine instead of from the server.</p>
  
  <p>My question then is this, <strong>is there any portable way to do this so that I can freely move between the machines and expect correct <code>git-submodule</code> behavior</strong>?</p>