Skip to content

Instantly share code, notes, and snippets.

@gabehollombe
Forked from anonymous/gist:5847013
Created June 24, 2013 00:07
Show Gist options
  • Save gabehollombe/5847018 to your computer and use it in GitHub Desktop.
Save gabehollombe/5847018 to your computer and use it in GitHub Desktop.
#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