Git allows you to activate --oneline and --decorate by default for log , show , etc.:
git config --global format.pretty oneline git config --global log.decorate short
However, with v2.1.0 v2.2.2, Git does not allow you to activate --graph by default. One way (adapted from SuperUser from this answer ) is to define the following function in your file .<shell>rc :
git() { if [ "$1" = "log" ] then command git log --graph "${@:2}"; else command git " $@ "; fi; }
One warning (indicated by hvd in his comment ): if you specify options between git and log , as in
git -c log.showroot=false log -p
because the first argument is -c , not log , the --oneline --decorate --graph flags will not be used.
source share