Skip to content

Instantly share code, notes, and snippets.

@dnicolson
Created September 25, 2015 11:07
Show Gist options
  • Save dnicolson/99c063195fa5a51eb341 to your computer and use it in GitHub Desktop.
Save dnicolson/99c063195fa5a51eb341 to your computer and use it in GitHub Desktop.
Git pre-push hook for printing a warning message
#!/bin/bash
printf "You are about to push, have you run ...? [y]\n"
read -s -n1 KEY < /dev/tty
if [ $KEY = 'y' ]; then
exit 0
fi
exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment