Git hooks allow you to execute scripts related to the git repository on a given action.
Capistrano allows you to manage the deployment of your production.
A single “deploy cap” call will clone your main branch on your target machine, archive the previous version, precompile your assets, restart the passenger. Capistrano can also transfer your database or execute any number of arbitrary commands that you want on any server configured in the deploy.rb file.
Go with Capistrano to deploy to the / db application server environment, it’s easy for you to find help when you have a deployment problem.
source share