Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

create git alias for `git log --all --decorate --graph --oneline`

Tags:

git

repository

I use the command git log --all --decorate --graph --oneline very often and I want to create an git alias for --all --decorate --graph --oneline.

I tried with git config --global alias.adgo "--all --decorate --graph --oneline", but when I typed git log adgo afterward, an error message was displayed, saying "fatal, ambiguous argument adgo".

Could someone tell how to get this git alias working? I have been struggling for a while now. Appreciate any help!

like image 523
Thor Avatar asked May 12 '26 21:05

Thor


1 Answers

You need to define it as

git config --global alias.adgo  "log --all --decorate --graph --oneline"

then use it as

git adgo
like image 69
Gwyn Evans Avatar answered May 15 '26 13:05

Gwyn Evans