This project is in details described here Create simple GIT workflow with automated script, like on GitHub.
Basic idea of this script is to skip using FTP/clients, scp or rsync for code upload to remote server. Instead this script will help you create robust Git workflow which involves protected bare Git repository and public repository which is served to visitors.
Public repository is mirror of bare repository. And bare repository is communication hub between your local development machine and public repository.
In couple of seconds you can create new repositories in a same way as you create them here on GitHub. One huge plus is that repository will be connected to public folder of your project via Git hooks.