views:

376

answers:

1

I am wondering how I can target a specific commit SHA in Git for deployment, using Capistrano? It should be something like

cap deploy --version=<sha targeted>

Can't seem to find the answer to this after a lot of searching.

+7  A: 

You can deploy a particular git commit/tree/branch/tag by doing something like:

cap -S branch=80655da8d80aaaf92ce5357e7828dc09adb00993 deploy
molf
is that the SHA for a specific commit?
Scott Miller
The branch will be passed to git with "git checkout <branch>", so a commit id should work just as fine as a tree id, branch name, etc.
molf