Skip to content

Instantly share code, notes, and snippets.

@nestserau
Created April 28, 2014 08:02
Show Gist options
  • Save nestserau/11364907 to your computer and use it in GitHub Desktop.
Save nestserau/11364907 to your computer and use it in GitHub Desktop.
Git commands aliases
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