Created
June 24, 2013 00:06
-
-
Save anonymous/5847013 to your computer and use it in GitHub Desktop.
Easier git commits from bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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