Created
August 18, 2024 03:33
-
-
Save potados99/26503c7fcf910475ba254a79eb87b6d4 to your computer and use it in GitHub Desktop.
Pre commit hook
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/bash | |
[ "$(git symbolic-ref --short HEAD)" = "main" ] && echo "Pushing to main is not allowed." && exit 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment