title: How do I find out what Git thinks the top-level working directory is?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/957928/is-there-a-way-to-get-to-the-git-root-directory-in-one-command">Is there a way to get to the git root directory in one command?</a>  </p>
  </blockquote>
  
  
  
  <p>Sometimes, I'm confused with git thinking that I'm inside a Git working dir, but it's not obvious to me what the top-level working directory (containing <code>.git/</code>) is. (Probably, that repo was created by a mistake.)</p>
  
  <p>So, how do I find out the top-level Git repo directory if I'm somewhere inside the subdirectories? How do I ask <code>git</code> to print what it thinks the current top-level working directory is?</p>