Skip to content

Instantly share code, notes, and snippets.

@tg90nor
Created September 14, 2015 13:51
Show Gist options
  • Save tg90nor/2dbd707bb5900a482a22 to your computer and use it in GitHub Desktop.
Save tg90nor/2dbd707bb5900a482a22 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
local_ref, local_sha1, remote_ref, remote_sha1 = STDIN.read.split(" ")
if remote_ref == "refs/heads/master"
puts "Pushing to origin/master is not permitted."
puts "This is a read-only branch."
puts ""
puts "Create a new branch instead."
exit 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment