Wouldn't it be nice have your changes up and running at a development site just by pushing it there with
git push dev? Well with Git that's pretty easy to achieve.
First create a new Git repository on the remote if you haven't yet:
Then push your code to this repository initially and then check it out:
git checkout your-branch
So now we need to make Git automatically checking out the latest code once you pushed it in. For that create the script ".git/hooks/post-receive":
git checkout -f
And don't forget to make the file executable.
Now as the code is automatically updated, we need to disable the usual warning when one pushes to a remote repository with a checkout:
git config receive.denycurrentbranch ignore
That's it. Simple and useful, not? :)
Credits go to http://toroid.org/ams/git-website-howto, which I used to come up with this.