title: Custom commands with git-shell
body: <p>How to create custom commands for git-shell? According to the <a href="http://www.kernel.org/pub/software/scm/git/docs/git-shell.html" rel="nofollow">documentation</a>:</p>
  
  <blockquote>
    <p>When -c is given, the program executes  non-interactively;
     can be one of git receive-pack, git upload-pack, git
    upload-archive, cvs server, or a command in COMMAND_DIR. The shell is
    started in interactive mode when no arguments are given; in this case,
    COMMAND_DIR must exist, and any of the executables in it can be
    invoked.</p>
  </blockquote>
  
  <p>However, I'm not sure I'm understanding this correctly. I created a user called gituser, and gave him /usr/bin/git-shell as a shell. I created a directory called git-shell-commands, and put a script called 'testy' in it, but I can't make it run via git-shell.</p>
  
  <p>Here is what I'm trying from an other machine:</p>
  
  <pre><code>$ ssh gituser@server.com testy
  fatal: unrecognized command 'testy'
  </code></pre>
  
  <p>Note that git-shell is working, and responding, it just can't find my custom command.</p>
  
  <p>And here is the script:</p>
  
  <pre><code>:/home/gituser/git-shell-commands# ls -l -a
  total 12
  drwxr-xr-x 2 gituser gituser 4096 Jan 22 17:35 .
  drwxr-xr-x 4 gituser gituser 4096 Jan 22 13:57 ..
  -rwxr-xr-x 1 gituser gituser   26 Jan 22 13:58 testy
  :/home/gituser/git-shell-commands# ./testy
  hello!
  :/home/sodigit/git-shell-commands# cat testy
  echo "hello!"
  </code></pre>
  
  <p>What am I doing wrong? How to run custom commands with git-shell?</p>