Skip to content

Instantly share code, notes, and snippets.

@ivey
Created February 22, 2009 15:23
Show Gist options
  • Save ivey/68496 to your computer and use it in GitHub Desktop.
Save ivey/68496 to your computer and use it in GitHub Desktop.
namespace :git do
task :unpushed do
ahead = `git log origin/#{branch}..#{branch} --pretty=oneline --abbrev-commit`
unless ahead == ""
puts "Whoa, hoss. Looks like you forgot to push the following SHAs:"
puts ahead
print "Continue with the deploy anyway? [y/N] "
if $stdin.gets.chomp.upcase != "Y"
puts "Good call. `git push` and come back."
exit
end
end
end
end
before "deploy:update_code", "git:unpushed"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment