Skip to content

Instantly share code, notes, and snippets.

@philmtd
Last active May 10, 2017 20:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save philmtd/152f20d8af69885bbb51024ad88ce28f to your computer and use it in GitHub Desktop.
Save philmtd/152f20d8af69885bbb51024ad88ce28f to your computer and use it in GitHub Desktop.
Git hook to replace a "wtc" commit message with a random whatthecommit.com message.
#!/bin/bash
comm_msg="$(cat $1)"
if [ "$comm_msg" = "wtc" ]; then
curl -L whatthecommit.com/index.txt > $1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment