<p>I am aware of <a href="http://www.capify.org/" rel="nofollow noreferrer">Capistrano</a>, but it is a bit too heavyweight for me. Personally, I set up two <a href="http://www.selenic.com/mercurial/wiki/" rel="nofollow noreferrer">Mercurial</a> repositories, one on the production server and another on my local dev machine. Regularly, when a new feature is ready, I push changes from repository on my local machine to repository on the server, then update on the server. This is a pretty simple and quick way to keep files in sync on several computers, but does not help to update databases.</p>
<p>What is your solution to the problem?</p>

[{'answer_id': 37908, 'author': 'Kyle Cronin', 'author_id': 658, 'author_profile': 'https://Stackoverflow.com/users/658', 'pm_score': 1, 'selected': False, 'text': "<p>I used to use git push to publish to my web server but lately I've just been using rsync. I try to make my site as agnostic about where it's running as possible (using relative paths, etc) and so far it's worked pretty well. The only challenge is keeping databases in sync, and for that I usually use the production database as the master and make regular backups and imports into my testing database.</p>\n"}, {'answer_id': 38061, 'author': 'Kyle Cronin', 'author_id': 658, 'author_profile': 'https://Stackoverflow.com/users/658', 'pm_score': 0, 'selected': False, 'text': '<p>@Andrew</p>\n\n<p>To use git push to deploy your site you will need to do first set up a remote server in your .git/config file to push to. Then you need to configure a hook that will basically perform a git reset --hard to copy the code you just copied to the repository to the working directory.</p>\n\n<p>I know this is a little vague, but I actually deleted the server-side .git folder once I switched to rsync, so I don\'t have the exact scripts that I used to make the magic happen. That might be a good candidate for a full question though, so you might get more responses that way.</p>\n\n<p><strong>edit:</strong> I know it\'s been a while, but I eventually found what I was using again:</p>\n\n<p><a href="https://stackoverflow.com/questions/279169/deploy-php-using-git#327315">Deploy a project using Git push</a></p>\n'}, {'answer_id': 168493, 'author': 'Steve Klabnik', 'author_id': 24817, 'author_profile': 'https://Stackoverflow.com/users/24817', 'pm_score': 0, 'selected': False, 'text': '<p>I\'m assuming you\'re speaking of Ruby on Rails.</p>\n\n<p>Check out the HowTo wiki:</p>\n\n<p><a href="http://wiki.rubyonrails.com/rails/pages/Howtos#deployment" rel="nofollow noreferrer">http://wiki.rubyonrails.com/rails/pages/Howtos#deployment</a></p>\n'}, {'answer_id': 184252, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 1, 'selected': False, 'text': '<p>Or <a href="http://www.nongnu.org/fab/" rel="nofollow noreferrer">Fabric</a>, if you prefer Python.</p>\n'}, {'answer_id': 327339, 'author': 'mat kelcey', 'author_id': 26094, 'author_profile': 'https://Stackoverflow.com/users/26094', 'pm_score': 1, 'selected': False, 'text': "<p>what's heavyweight about capistrano? if you want to sync files then sure rsync is great. but if you're then going to need to do db updates maybe cap isn't so bad ?</p>\n"}]
['https://Stackoverflow.com/questions/37887', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4018/']