ssh user@remote.host
cd public_html/git
mkdir my-project.git && GIT_DIR=my-project.git git-init
chmod +x my-project.git/hooks/post-update
logout
# push
git push ssh://remote.host/~user/public_html/git/my-project.git master:refs/heads/master
# push using a remote
git remote add remote-host ssh://remote.host/~user/public_html/git/my-project.git
git push remote-host master:refs/heads/master