title: Why doesn't my Git pre-commit hook trigger in a cloned repository?
body: <p>I just wrote small pre-commit hook to perform my custom action. My central repository is on a Solaris server and HTTP enabled. </p>
  
  <pre><code>/apps/opt/git/myrepo.git 
  </code></pre>
  
  <p>I edited pre-commit hook and modified as below:</p>
  
  <pre><code>#!/bin/sh -x
  if [ $LOGNAME -ne bala ]; then
     echo  "You are not allowed"
     exit 1;
  fi
  </code></pre>
  
  <p>If I clone this repository and perform the commit action using other user, it doesn't give any message, and commits it.
  Why is my commit not invoking the <code>pre-commit</code> hook?</p>
  
  <p>Also I could see in my cloned repo under <code>.git/hooks</code> directory, the "<code>pre-commit</code>" hook is not there, I can see only the default templates.</p>
  
  <p>Can anyone help here?</p>