When deploying from Capistrano, I like to have the following in my ‘deploy.rb’ file:
set :scm, "git" set :repository, "git@www.example.com:project.git" set :git_shallow_clone, 1 set :deploy_via, :remote_cache
This allows speeds deployments by keeping a versions checked out on the server in ‘shared/cached-copy’. When it comes to deploying, it is always best to deploy from a branch instead of the master/head/trunk. To handle this, add the following:
set :branch, fetch(:branch, “master”)
When you deploy, run the following:
$ cap deploy -S branch=REL_1.0
If you don’t specify the branch, the master is used.

Can I suggest this improvement:
set :branch, fetch(:branch, “master”)
fetch returns it’s 2nd argument if the 1st (the varaible name) is nil, otherwise it returns the preexisting value
Lee, thanks for the tip! Code has been updated.