Web Deployment With Git
This is my solution to do the following 1) deploy a website from my local machine to my server in one step 2) keep a git repository on the server (mainly to have it as backup) I use a combination of git push and rsync to achieve this. Create git repositories on your local machine and the server. 1) create a bare git repository on the server (this is the repository that will be pushed to) $ mkdir /home/cogan/git_projects/myproject.git $ cd myproject $ git init --bare 2) create a git repository on the development machine (where you will do the deployment from) $ mkdir /home/cogan/projects/myproject $ cd myproject $ git init add a test file to the git repository and commit $ echo "<h1>[G]It Works!</h1>" > test.html $ git add test.html $ git commit -m "initial commit" Set up remote repository 3) On your local machine add the repository on the server as a remote repository called 'web' $ git remote add web ss...