Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # if the branch is master, then fail.
- branch="$(git symbolic-ref HEAD 2>/dev/null)" || \
- "$(git describe --contains --all HEAD)"
- if [ "${branch##refs/heads/}" = "master" ]; then
- echo "Do not commit on the master branch!"
- exit 1
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement