title: How could I tell a give directory is git repo(bare or not bare) in Python
body: <p>Is there any way to tell if a directory is a GIT repo in Python?</p>
  
  <p>I am try to check if there's ".git" under that directory, but it doesn't work with bare repo.</p>