Created
June 14, 2021 18:41
-
-
Save Tsugami/e9d26a8c4e50462898ee2156b9a56742 to your computer and use it in GitHub Desktop.
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
branch="$(git rev-parse --abbrev-ref HEAD)" | |
if [ "$branch" = "main" ] || [ "$branch" = "dev" ]; then | |
echo "You can't commit directly to the \"$branch\" branch, please checkout to a new branch before committing" | |
exit 1 | |
f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment