very similar to this question: How to make git log decorate by default
I would like to make git log
do git log --graph
. I assumed I could add something like graph = true
to the [log]
section of my ~/.gitconfig
file, but it did not work, nor did any of the other 28 things I tried putting into the [log]
section. :(
I expect it will be suggested that I add an alias like git lg
. I do not want to create an alias. I have two reasons for this:
- my fingers have been typing
git log
for over a decade and I have no interest in changing that - As a result of my career, I am extremely conservative with my usage of aliases. I cannot add, nor am I always able to add, my alias to however many thousands of machines I end up interacting with as a cloud engineer. I use git on multiple machines and I want
git log
to be the solitary command I use to display the git log.
UPDATE: I thought of a way to do it, but I hate it. The idea is to create a bash script called git
and put it somewhere in my path before /usr/bin/git
. All it would do is call /usr/bin/git
with whatever arguments are passed, unless it is a log
in which case it will do the same but tack on a --graph
. /me shudders