Skip to content

Instantly share code, notes, and snippets.

@hkdnet
Created October 4, 2015 23:39
Show Gist options
  • Save hkdnet/ca4a958e84c37d90757f to your computer and use it in GitHub Desktop.
Save hkdnet/ca4a958e84c37d90757f to your computer and use it in GitHub Desktop.
.git/hooks/pre-commit
#!/usr/bin/env ruby
if `git branch`.chomp.split("\n").find { |e| e == '* master' }
puts 'ここはmasterブランチ。許可のないやつは通せないぜ > 乂・д・)'
exit false
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment