title: git shortcut to stage changes from different directory
body: <p>Considering a git-repository in the directory <strong>my_dir</strong>, I have</p>
  
  <ul>
  <li>a subdirectory with <em>testdata</em> at <strong>my_dir/path/to/my/testdata</strong></li>
  <li>a subdirectory with <em>source code</em> at <strong>my_dir/a/different/path/to/my/sourcecode</strong></li>
  </ul>
  
  <p>If I modify sourcecode using my IDE, but want to commit these changes via terminal from my <em>testdata</em> directory, I need to provide</p>
  
  <pre><code>git add ../../../a/different/path/to/my/sourcecode/file_with_changes.foo
  </code></pre>
  
  <p>My question: Does git provide an easier way of specifying changed files?</p>
  
  <p>E.g.:</p>
  
  <pre><code>git add file_with_changes.foo
  </code></pre>
  
  <p>Edit: The <em>testdata</em> directory contains furthermore config-files, which might be changed temporary, but should be excluded from the commit (possibly commited afterwards)</p>