title: fatal: Not a git repository: '.git' error
body: <p>I have created a pre-commit hook which takes the database dump and saves it in a file under my application/folder  which is also in the git repo, after saving it I add the file to commit list . Following is the code in my pre-commit file</p>
  
  <pre><code>    D:/xampp/mysql/bin/mysqldump -u root -pxyz --skip-extended-insert [database] &gt; D:/xampp/htdocs/app/application/[database].sql
  
  cd D:/xampp/htdocs/app/application
  git add [database].sql
  </code></pre>
  
  <p>I tried to run the pre-commit code directly through command prompt it works without any error but when I try to commit the code through git bash I get this error </p>
  
  <pre><code>fatal: Not a git repository: '.git' 
  </code></pre>
  
  <p>I am assuming its because of the git command used in the pre-commit file, can anyone tell me whats wrong in this file and how I should amend it </p>