title: Unable to push to remote GIT repository -- "[...] does not appear to be a git repository"
body: <p>I've set up my GIT repository on my server using the following in the appropriate folder (the root of my subdomain, <code>git.mydomain.com</code>):</p>
  
  <pre><code>mkdir foo.git
  cd foo.git
  git init --bare --shared
  </code></pre>
  
  <p>This would make the repository available by the URL <code>git.mydomain.com/foo.git</code>.</p>
  
  <p>On my client, trying to push the commited files to the server using the following:
  mkdir foo</p>
  
  <pre><code>cd foo
  git init
  git remote add foo myUser@git.mydomain.com:foo.git
  git add readme.txt
  git commit -m "foo"
  git push foo master
  .. entering user password ..
  </code></pre>
  
  <p>Only results in:</p>
  
  <pre><code>fatal: 'foo.git' does not appear to be a git repository
  fatal: The remote end hung up unexpectedly
  </code></pre>
  
  <p>However, following a set of different guides, I seem to be unable to resolve this problem. Any suggestions would be highly appreciated, please bear in mind that I'm quite green to GIT.</p>