Skip to content

Instantly share code, notes, and snippets.

@mvines
Created November 6, 2015 18:04
Show Gist options
  • Save mvines/d958e2c6b6f9ebf15924 to your computer and use it in GitHub Desktop.
Save mvines/d958e2c6b6f9ebf15924 to your computer and use it in GitHub Desktop.
chmod +x it and put it in your path. usage: |git fsckit|
#!/bin/bash
#
# A helpful replacement for |git commit| during bouts of despondency
#
while read line; do
if [[ $line =~ id=\"content\" ]]; then
read line
if [[ $line =~ ^\<p\>(.*) ]]; then
git commit --file=<(echo ${BASH_REMATCH[1]}) $@
break
fi
fi
done < <(curl -s http://whatthecommit.com/)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment