title: Using a Git hook to create a commit log and add to the current commit
body: <p>I'm running this shell script whenever I do a <code>git commit -m "msg"</code> which writes the commit log to a php file. I want it to include the current commit message as well that I am doing at that time.</p>
  
  <p>My shell script:</p>
  
  <pre><code>#!/bin/sh
  path="path/to/gitlog.php"
  echo "&lt;?php $git_log = array(" &gt; $path
  git log --date=iso --pretty=format:'array("%h","%an","%ad","%s"),' &gt;&gt; $path
  echo ");" &gt;&gt; $path
  </code></pre>
  
  <p>The gitlog.php gets saved to my repository, which I will then <code>git push</code>.</p>
  
  <p>I currently have it in 'pre-commit' hook, is there a way to get the committing message within this hook?</p>
  
  <p><strong>My use case</strong></p>
  
  <p>I am the only developer in the project. Time is short! it's for others who are involved in the project to see progress and read the descriptive commit logs without the overhead of me having to double up. The log is output to a dashboard that everyone has access to. </p>
  
  <p>Git is not running on the dashboard server, and files are deployed from a repository hosting company (Beanstalk)</p>