Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how can i make git log show tree with all my parameters by default?

Tags:

git

github

Often I use "git log --graph --all --decorate --online" command.

It's verbose and tedious to write it with all the parameters. I know that i want these options always be applied to my git log cmd.

edit:i want only git to change its behavior - not writing some script outside of it, tweaking win shell or smth! I want to write "git log" and it does

"git log --graph --all --decorate --online" automatically

Like in vim, there is probably some default config file?

like image 547
ERJAN Avatar asked Nov 01 '25 12:11

ERJAN


1 Answers

You can create aliases in ~/.gitconfig file.

Basically, add the following to your .gitconfig:

[alias]
     llog = log --graph --all --decorate --online

Now when you call git llog, it will execute git log --graph --all --decorate --online

For furhter information read this.

like image 86
fcat Avatar answered Nov 03 '25 03:11

fcat