Created
April 3, 2017 12:29
-
-
Save mariofink/fa325e24ceb054ed2659661ae21393a9 to your computer and use it in GitHub Desktop.
Git pre-push hook to avoid pushing tags
This file contains hidden or 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 | |
while read -d $'0' arg ; do | |
echo $arg | |
if [[ $arg == *"/tags/"* ]]; then | |
echo "Pushing tags is not allowed!" | |
exit 1 | |
fi | |
done | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment