title: Submodule forked repository fetching parent repository's branches
body: <p><strong>TLDR:</strong> Can I possibly check out the branches of a forked repository that is a git submodule? Right now it only appears to be checking out the parent repo's branches, even though it is detached HEAD with all my forked repo's recent commits.</p>
  
  <hr>
  
  <p>There was an open-source library that I do not manage called <code>TheLibrary</code> that I added as a git submodule. Then I needed to modify the library and use it as a git submodule, so I forked it on github, added a new branch <code>modifications</code> and put my modifications on there.  Then I updated my project's <code>.gitmodules</code> file to contain my forked library's URL, like so:</p>
  
  <pre><code>[submodule "libs/TheLibrary"]
      path = libs/TheLibrary
      url = https://github.com/myUsername/TheLibrary.git
      branch = modifications
  </code></pre>
  
  <p>Then I did <code>git submodule sync</code> in terminal, which gave this result:</p>
  
  <pre><code>Synchronizing submodule url for 'libs/TheLibrary'
  </code></pre>
  
  <p>Then I went in to the <code>libs/TheLibrary</code> directory on the terminal, and when I did <code>git fetch</code> it gave me the branches from the parent repo (master, feature/FeatureA). However, my forked repository should only have these branches: (master, modifications). </p>
  
  <p>When I did <code>git remote -v</code>, it gave this result:</p>
  
  <pre><code>origin  https://github.com/myUsername/TheLibrary.git (fetch)
  origin  https://github.com/myUsername/TheLibrary.git (push)
  </code></pre>
  
  <p>When I do <code>git branch</code>, it has this:</p>
  
  <pre><code>* (HEAD detached at a1b2c3def)
  feature/featureA
  master
  </code></pre>
  
  <p>However, feature/featureA is just a pull request I did on the parent repository. My forked repository should have the <code>modifications</code> branch that I added.</p>
  
  <p>When I do <code>git log</code>, it is showing all the recent commits from the <code>modifications</code> branch though. </p>
  
  <p><strong>How do I check out the <code>modifications</code> branch so I can continue adding changes to the forked library, and push them to the remote repo? The purpose is that I want it to still be able to merge in updates from the parent repo into our own changes. Is that even possible? Thanks!</strong></p>