benoror@macmini:~/simpleapp $ git initThen I just zip and copy the project to the production server. After extract it I clone it as a bare repo:
benoror@macmini:~/simpleapp $ git add .
benoror@macmini:~/simpleapp $ git commit -a -m "First commit"
benoror@dreamhost:~ $ git clone --bare simpleapp simpleapp.gitThis bare repo will act as the main repo (who said central?). Then I just add a remote origin in my computer:
benoror@macmini:~/simpleapp $ git remote add origin ssh://benoror@production.com/~/simpleapp.gitI assume you already copied your SSH keys and credentials. The workflow is as follows:
1. When I make changes in my computer just commit and push:
benoror@macmini:~/simpleapp $ git push origin master
2. Then I log into my production server and pull changes in the non-bare repo:
benoror@macmini:~/simpleapp $ ssh production.com
benoror@dreamhost:~ $ cd simpleapp
benoror@dreamhost:~/simpleapp $ git pull
3. I have automatized the deployment process with a script that pull changes, restart Passenger, migrate db in case of schema has changed and finally re-index Sphinx.
:wq