This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This script will install a Git pre-commit hook that stop accidental commits to master and develop branches. | |
# There is also a variant that includes a core.whitespace check. See pre-commit-2 below. | |
# Install in current Git repo: | |
# curl -fL https://gist.githubusercontent.com/stefansundin/9059706/raw/install-pre-commit.sh | sh | |
# Install with core.whitespace check: | |
# curl -fL https://gist.githubusercontent.com/stefansundin/9059706/raw/install-pre-commit.sh | sh -s pre-commit-2 | |
# Install with core.whitespace check and EOF-newline-check: | |
# curl -fL https://gist.githubusercontent.com/stefansundin/9059706/raw/install-pre-commit.sh | sh -s pre-commit-3 | |
# Install only core.whitespace check: |