Skip to content

Instantly share code, notes, and snippets.

@nishad
Created March 16, 2019 10:16
Show Gist options
  • Save nishad/83830f3ae54b143865c9de53b7b00f0e to your computer and use it in GitHub Desktop.
Save nishad/83830f3ae54b143865c9de53b7b00f0e to your computer and use it in GitHub Desktop.
A quick and dirty git commit command
#!/bin/bash
git-random(){ gitRan=$(curl -L -s http://whatthecommit.com/ |grep -A 1 "\"c" |tail -1 |sed 's/<p>//'); git commit -S -m "$gitRan"; }
if [ -z "$1" ]; then
git add --all .
git-random
else
git add --all .
git commit -S -m "$*"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment