Let's say you have a remote user www
, your server is domain.com
and your app is myapp
:
www@domain.com:~$ mkdir myapp repo/myapp.git
www@domain.com:~$ cd repo/myapp.git
www@domain.com:/home/www/repo/myapp.git$ git init --bare
www@domain.com:/home/www/repo/myapp.git$ touch hooks/post-receive
www@domain.com:/home/www/repo/myapp.git$ chmod +x hooks/post-receive