title: How do I get `git clone --recursive` to recreate submodules' remotes and branches?
body: <p>I have a project with a handful of submodules.  Many of them are cloned from a GitHub fork to which I've added a branch for my custom mods.  A typical setup is like thus:</p>
  
  <p>In local folder: MyProject1/Frameworks/SomeAmazingRepo/</p>
  
  <pre><code>$ git branch -vva
  *my-fork                       123456 [my-fork/my-fork] Latest commit msg from fork
  master                         abcdef [origin/master] Latest commit msg from original repo
  remotes/my-fork/my-fork        123456 [my-fork/my-fork] Latest commit msg from fork
  remotes/my-fork/master         abcdef [origin/master] Latest commit msg from original repo
  remotes/origin/HEAD            -&gt; origin/master
  remotes/origin/master          abcdef [origin/master] Latest commit msg from original repo
  
  $ git remote -v
  my-fork                        git@github.com:MyUser/SomeAmazingRepo.git (fetch)
  my-fork                        git@github.com:MyUser/SomeAmazingRepo.git (push)
  origin                         git://github.com/OriginalOwner/SomeAmazingRepo.git (fetch)
  origin                         git://github.com/OriginalOwner/SomeAmazingRepo.git (push)
  </code></pre>
  
  <p>I <code>git clone --recursive</code> my project to begin a new spin-off project and when it begins to recurse, it spits out an error claiming it can't find the stored commits for these repos.  Upon inspection it seems that the remotes haven't been added and the branch is left (empty) in master ...</p>
  
  <p>In local folder: MyProject2/Frameworks/SomeAmazingRepo/</p>
  
  <pre><code>$ git branch -vva
  *master                        abcdef [origin/master] Latest commit msg from original repo
  remotes/origin/HEAD            -&gt; origin/master
  remotes/origin/master          abcdef [origin/master] Latest commit msg from original repo
  
  $ git remote -v
  origin                         git://github.com/OriginalOwner/SomeAmazingRepo.git (fetch)
  origin                         git://github.com/OriginalOwner/SomeAmazingRepo.git (push)
  </code></pre>
  
  <p>The only remedy is to go and add the remotes manually to all the repos (very tedious).</p>
  
  <p>There exists a similar issue in the cases where there are two tracking branches as above but only one remote (origin => my github fork).  In these case, it finds the commit and checks it out but fails to recreate the tracking branch, leaving a "dangling" commit...very scary as it doesn't warn you!</p>
  
  <p>How do I clone my project so that it reliably recreates the submodules' remotes and branches?</p>