motorscript.com

SSH into the server

cd
mkdir repo.git app conf logs media static
cd repo.git
git init --bare
git --bare update-server-info
git config core.bare false
git config receive.denycurrentbranch ignore
git config core.worktree /home/user/app/

cat > hooks/post-receive <<EOF
#!/bin/sh
git checkout -f
EOF

chmod +x hooks/post-receive

exit

On the client

git remote add server user@awecode.com:/home/user/repo.git/
ssh-copy-id user@awecode.com
git push server --all