Problems using git

I’ve been using Git for a couple of weeks, and following the article in the wiki ( I managed to successfully create a remote repository on one of my subdomains hosted on DH and sync it with my local repository, so I wanted to do the same thing for every website I manage.

So now I have:

  • A remote git repository named project-1.git placed inside folder in my home dir on DH
  • A local git repository placed inside my local project-1 folder

when I make changes to file.ext in my local folder I commit the change so that file.ext in my remote folder is updated (wow!).

I would like to do the same thing with my folder, so I created a bare Git repository named project-2.git and local git repository inside my project-2 folder, but everytime I make a change to file.ext in my local project-2 folder and commit the change to the remote project-2 repository, changes are tracked in Git, but the remote file is not updated!!

I tried to delete and initialize new local and remote Git repositories, but I can’t make it work on my domain, just on my subdomain. Any suggestions?

Pushing changes to a remote git repository does not make that repository automatically check out the new HEAD. To do that, you’ll need to set up a post-receive hook — check Google for details.