Skip to content

Instantly share code, notes, and snippets.

@mariofink
Created April 3, 2017 12:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mariofink/fa325e24ceb054ed2659661ae21393a9 to your computer and use it in GitHub Desktop.
Save mariofink/fa325e24ceb054ed2659661ae21393a9 to your computer and use it in GitHub Desktop.
Git pre-push hook to avoid pushing tags
#!/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