title: How to find the path of the local git repository when I am possibly in a subdirectory
body: <p>I'm looking for something like <code>git list-path</code> printing the
  path of the associated repository (the <code>.git</code> directory).</p>
  
  <p>A bit of background: I have set up git version control on quite a few of my
  projects/folders.  Some of them are nested, so one directory with echo own repository is a subfolder to another directory tracked with another repository. </p>
  
  <p>E.g. in my home directory (<code>~</code>) I use git to track my dot files, but
  in folder <code>~/photo/meta-mix/</code> I have another project I track with a
  separate repository. Now, say,I have set up another project in directory
  <code>~/photo/meta-match/</code>, but I don't know anymore whether it has its own
  repository. So I want to find out whether this directory is version
  controlled and where its repository is.</p>
  
  <p>How can I do this with a git command? <code>git status</code> can give me </p>
  
  <pre><code>nothing to commit
  </code></pre>
  
  <p>in <em>both</em> cases, when <code>~/photo/meta-match/</code> has its own repository or when it just refers to the repository of <code>~</code>. </p>