Created
April 28, 2014 08:02
-
-
Save nestserau/11364907 to your computer and use it in GitHub Desktop.
Git commands aliases
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
function changes() { | |
if [ "$1" = "show" ] | |
then | |
git log -n 10 --no-merges | |
elif [ "$1" = "get" ] | |
then | |
git pull --rebase | |
elif [ "$1" = "post" ] | |
then | |
git push | |
elif [ "$1" = "save" ] | |
then | |
git commit -am "$2" | |
elif [ "$1" = "unsaved" ] | |
then | |
git status | |
else | |
info="\n | |
Unknown parameter '$1'.\n | |
Possible parameters are:\n\n | |
show\t\tShort for git log with no merges;\n | |
get\t\tgit pull with rebase;\n | |
post\t\tPushes the current branch;\n | |
save\t\tCommits unsaved changes;\n | |
unsaved\tShows unsaved changes.\n | |
" | |
echo -e $info | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment