title: Git add library outside of project folder?
body: <p>I have the following project structure:</p>
  
  <ul>
  <li><p>MyProgram/</p>
  
  <ul>
  <li><p>.git/</p></li>
  <li><p>MyProgram/</p>
  
  <ul>
  <li><p>File.c</p></li>
  <li><p>File.h</p></li>
  <li><p>MainFile.c</p></li>
  </ul></li>
  </ul></li>
  <li><p>MyProgram.exe</p></li>
  <li><p>MyStaticLibrary/</p>
  
  <ul>
  <li><p>MyStaticLibrary/</p>
  
  <ul>
  <li><p>ImportantFile.c</p></li>
  <li><p>ImportantFile.h</p></li>
  </ul></li>
  </ul>
  
  <p>In <strong>Microsoft Visual Studio 2015</strong>, I linked <em>MyProgram</em> with <em>MyStaticLibrary</em> so I could use <em>ImportantFile.c/h</em> in multiple of my projects. However, when it came to commiting this to GitHub, I discovered that I couldn't find a way to <code>add</code> <code>MyStaticLibrary</code> to the repo. If I attempt to, it gives the following error:</p>
  
  <p><code>fatal ../MyStaticLibrary is outside repository</code></p>
  
  <p>I don't want to do any merging or manual copy pasting because what if I had 100 libraries? Then you can't just copy paste on every commit. Another option is for me to just not include <code>MyStaticLibrary</code> on my repository but then anyone who wishes to compile my code cannot do so. </p>
  
  <p>What do I do?</p></li>
  </ul>