Last Updated: February 25, 2016
·
7.171K
· sgtpooki

Random git commit message thanks to whatthecommit.com

Just for fun, but you can set up a git alias to commit random commit messages for you with the following:

git config --global alias.commit-rnd !"sh -c \"git commit -m '$(curl -s http://whatthecommit.com/index.txt)'\""

Your syntax may vary, as I am using gow on windows, which makes a lot of terminal things weird, but your git config file (git config --global -e) should have something like this appended to it.

[alias]
commit-rnd      =  !sh -c \"git commit -m '$(curl -s http://whatthecommit.com/index.txt)'\"    

To use your new alias, type

git commit-rnd

whenever you want to make a commit with a random commit message.

**Please use at your discretion and do not blame your team-lead's tirade on me.

Thanks go out to whatthecommit.com, Jen Heilemann, and Andrew Tongen.

2 Responses
Add your response

Cool! Until http://whatthecommit.com/index.txt return something malicious like:

"` sudo rm -rf /` pawned!"

;)

over 1 year ago ·

Great alias, thank you !

over 1 year ago ·