I used Mercurial (Hg) before, and it was ok to do something like at the local PC:
hg clone ssh://peter@hostingcompany.com/~/mysite.com
and
Git does not support pushing to a branch, that is checked out at the remote end.
The recommended way is to use bare repository on the server. Normally you either push to the repository (and make it bare) or work on it, but not both. Even if you want to have a working copy on the server, I'd suggest you look at this question.
So you have two options:
mysite.com.git) and a non-bare repository (mysite.com). In the bare repository, add a post-update hook to git --git-dir=.../mysite.com pullMake just one repository and:
Detach the head: git checkout master@{0}
Add a post-update hook to git merge master
The reason here is that git refuses to modify the checked-out branch, but if you uncheckout the branch, you will be able to push. And you will be able to update the working directory from a hook (hook is a script placed in hooks directory in the repository). You can either create a separate branch and check out that, or you can use the "detached HEAD" state (as suggested above—git remembers which branch is checked out by having a special reference "HEAD" that points to the branch, but if you check out something, that is not a branch, it is made to point to a revision directly and that's called a "detached branch" and since no branch is checked out, allows you to push to any of them).