Advertisement
Guest User

Untitled

a guest
Aug 4th, 2015
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. # if the branch is master, then fail.
  4.  
  5. branch="$(git symbolic-ref HEAD 2>/dev/null)" || \
  6. "$(git describe --contains --all HEAD)"
  7.  
  8. if [ "${branch##refs/heads/}" = "master" ]; then
  9. echo "Do not commit on the master branch!"
  10. exit 1
  11. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement