We'll be working with a normal repository from here on out!
|ssh-keygen -t rsa |# Creates two files - .ssh/id_rsa and .ssh/id_rsa.pub by default
|ssh remote-server |mkdir .ssh |chmod u=rwx,go= .ssh |touch .ssh/authorized_keys |chmod u=rw,go= .ssh/authorized_keys |# Open .ssh/authorized_keys and copy contents of your .ssh/id_rsa.pub into it
or use ssh-copy-id if your platform supports it
PROTIP: Can't connect without a password? Check .ssh folder and file permissions!
|mkdir docroot |cd docroot |git init .
|git config receive.denyCurrentBranch ignore
|# Transfer post-receive.sh to .git/hooks/post-receive |chmod +x .git/hooks/post-receive
|mkdir deploy |# Copy after_push.sh to deploy/after_push |git add deploy |git commit
|git remote add production "email@example.com:/full/path/to-repo"
|git push production master
|git push production your-branch:master
|git push production HEAD~1:master