Skip to content

Instantly share code, notes, and snippets.

Created June 24, 2013 00:06
Show Gist options
  • Save anonymous/5847013 to your computer and use it in GitHub Desktop.
Save anonymous/5847013 to your computer and use it in GitHub Desktop.
Easier git commits from bash
#Functions for lazy git commiting
#Instead of: git commit -m "some message"
#Type: gci some message
gci() {
if [ -z "$1" ] # Is parameter #1 zero length?
then
echo "You must pass a commit message like this: gci some message here - which then becomes: git commit -m 'some message here'"
else
git commit -m "$*"
fi
}
gac() {
if [ -z "$1" ] # Is parameter #1 zero length?
then
echo "You must pass a commit message like this: gac some message here - which then becomes: git commit -am 'some message here'"
else
git commit -am "$*"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment