With Capistrano, you can deploy by specifying a specific branch or commit.
Deploy by specifying a branch name
cap production deploy -S branch="hoge_branch"
Deploy by specifying a revision number
cap production deploy -S revision=80655da8d80aaaf92ce5357e7828dc09adb00993
That’s all from the Gemba.