11 June 2021

How to create an alias command in git to display a log in graph?

How to create an alias command in git to display a log in graph?


$alias graph="git log --all --oneline --graph  --decorate"

(I find that it outputs the same as without '--decorate'.)

Note:

'--oneline' is a shorthand for both '--pretty=oneline' and  '--abbrev-commit' used together.

-----------------------------------------------------------------------------------------

I find the 2 following commands are very helpful,

1.

$git log --all --oneline --graph

2.

$git show-branch --all --more=1000

(you can replace 1000 with any number, according to your requirements.)

No comments:

Post a Comment