title: Using Git to track mysql schema - some questions
body: <p>If this is recommended ? </p>
  
  <p>Can I ask some git command examples about how to track versions of mysql schema?</p>
  
  <p>Should we use another repository other then the one we normally use on our application root ?</p>
  
  <p>Should I use something called hook ? </p>
  
  <p><strong>Update:</strong></p>
  
  <p><strong>1)</strong> We navigate onto our project root where .git database resides.</p>
  
  <p><strong>2)</strong> We create a sub folder called hooks.</p>
  
  <p><strong>3)</strong> We put something like this inside a file called db-commit:</p>
  
  <pre><code>   #!/bin/sh
     mysqldump -u DBUSER -pDBPASSWORD  DATABASE --no-data=true&gt; SQLVersionControl/vc.sql
     git add SQLVersionControl/vc.sql
     exit 0
  </code></pre>
  
  <p>Now we can:</p>
  
  <p><strong>4)</strong> <code>git commit -m</code> </p>
  
  <p>This commit will include a mysql schema dump that has been run just before the commit.</p>
  
  <p>The source of the above is here: 
  <a href="http://edmondscommerce.github.io/git/using-git-to-track-db-schema-changes-with-git-hook.html" rel="noreferrer">http://edmondscommerce.github.io/git/using-git-to-track-db-schema-changes-with-git-hook.html</a></p>
  
  <p>If this is an acceptable way of doing it, can I please ask someone with patience to comment line by line and with as much detail as possible, what is happening here:</p>
  
  <pre><code>#!/bin/sh
  mysqldump -u DBUSER -pDBPASSWORD  DATABASE --no-data=true&gt; SQLVersionControl/vc.sql
  git add SQLVersionControl/vc.sql
  exit 0
  </code></pre>
  
  <p>Thanks a lot.</p>