Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Check to see if you have changes in head which have not been pushed before deploying
namespace :deploy do
desc "Make sure there is something to deploy"
task :check_revision, :roles => :web do
unless `git rev-parse HEAD` == `git rev-parse origin/master`
puts "WARNING: HEAD is not the same as origin/master"
puts "Run `git push` to sync changes."
before "deploy", "deploy:check_revision"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.