title: Automatically updating git repository using crontab
body: <p>I'm trying to automate a job I'm duing daily by hand. I ended up writing a sh script to push a git repository.</p>
  
  <p>the script is located at <code>/home/autogit-project.sh</code></p>
  
  <p>And looks like this: </p>
  
  <pre><code>#!/bin/sh
  cd /var/www/project
  
  git add *
  timestamp(){
     date +"%d.%m.%Y um %H:%M"
  }
  git commit -am "Auto Server Commit $(timestamp)"
  git push --repo https://[user]:[password]@github.com/[organisation]/[repo].git
  </code></pre>
  
  <p>when running the script via <code>$ sh autogit-project.sh</code> it works. </p>
  
  <p>For testing purpose I want to run the script every minute. My Crontab looks like this:</p>
  
  <pre><code>@daily /home/anotherscriptthatworks.sh
  * * * * * /home/autogit-project.sh
  </code></pre>
  
  <p><code>anotherscriptthatworks.sh</code> is in the same directory with the same user right. the script writes a log file, so I know it works. My <code>autogit-project.sh</code>  however does not and I'm struggling to find out why. Any ideas or help is very welcome.</p>