title: Git - Pushing changes to master from a submodule?
body: <p>I have two git repositories, <code>A</code> and <code>B</code></p>
  
  <p><code>A</code> is a library that other projects love to use. It has only one branch <code>master</code>.</p>
  
  <p>In <code>B</code>, I add <code>A</code> as a submodule, and so it clones it into <code>B</code>'s directory. The <code>HEAD</code> is NOT detached since I said to track branch <code>master</code> when adding.</p>
  
  <p>Inside my project <code>B</code>, I notice a bug in <code>A</code>'s code. I change the code inside the submodule <code>A</code> (the cloned code that lied inside of <code>B</code>'s directory). I now want to commit those changes I've made to <code>A</code> from within <code>B</code> commit them to the master branch of <code>A</code>, leaving <code>B</code> still with zero commits.</p>
  
  <p>How can this be done?</p>
  
  <p>Ex.</p>
  
  <pre><code>Projects
  |---A                   # Existing repository. On branch master.
  |---B                   # Repository just created.
  
  
  git init
  git submodule add -b master ../A
  git submodule update --remote 
  cd A/
  vi importantFile.txt    # Here I make changes to internal files in A
  # How do I now commit those changes and add a commit to A?  
  </code></pre>