Idea from http://krisjordan.com/essays/setting-up-push-to-deploy-with-git
These are the steps for this setup:
cd
mkdir push-to-deploy
cd push-to-deploy
mkdir {development,remote}
cd remote
git init --bare
cd ..
cd development
git init
echo "Hello, world." >> file.txt
git add file.txt
git commit -m 'First commit.'
git remote add production ../remote
git push production master:master
git push production master:production
Create 'live' repo by cloning it from 'remote'
cd ..
git clone -b production ./remote/ live
Next create the following script and copy it in as bare-repo's hooks/post-receive
see below file to copy-paste the content
cd ./remote/hooks
touch post-receive
chmod +x post-receive
nano post-receive
Open new terminal aside and let it watch live repo files to see if they change
watch 'ls -al ~/push-to-deploy/live'
Create a commit with new file to production branch where you actively develop
cd ../../development
touch newfile.txt
git add newfile.txt
git commit -m 'Added new stuff'
git push production master:production
You should see two things. First, you should see "remote: Changes pushed to live". Second, in new terminal with watch you should see that 'live'-folder was updated.