title: How can I specify a branch/tag when adding a Git submodule?
body: <p>How does <code>git submodule add -b</code> work?</p>
  
  <p>After adding a submodule with a specific branch, a new cloned repository (after <code>git submodule update --init</code>) will be at a specific commit, not the branch itself (<code>git status</code> on the submodule shows "Not currently on any branch").</p>
  
  <p>I can't find any information on <code>.gitmodules</code> or <code>.git/config</code> about the submodule's branch or any specific commit, so how does Git figure it out?</p>
  
  <p>Also, is it possible to specify a tag instead of a branch?</p>
  
  <p>I'm using version 1.6.5.2.</p>