Created
March 2, 2010 03:27
-
-
Save innerfence/319097 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :git do | |
task :check_heads do | |
my_head = run_locally( 'git ls-remote . refs/heads/master' ) | |
origin_head = run_locally( 'git ls-remote origin refs/heads/master' ) | |
if my_head != origin_head | |
raise "Your master is not in sync with origin" | |
end | |
end | |
end | |
before 'deploy:update_code', 'git:check_heads' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment