Skip to content

Instantly share code, notes, and snippets.

@jasonchester
Forked from philmtd/commit-msg
Created May 10, 2017 20:42
Show Gist options
  • Save jasonchester/e548fc05023c86e7156fdc80d08cd7a8 to your computer and use it in GitHub Desktop.
Save jasonchester/e548fc05023c86e7156fdc80d08cd7a8 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