---
title: "git ll"
url: https://perrotta.dev/2025/08/git-ll/
last_updated: 2026-01-03
---


In my `~/.gitconfig` there's an alias for `git log`, inspired by [Thorsten
Ball](https://registerspill.thorstenball.com/p/how-i-use-git)[^1]:

```ini
[alias]
  ll = "!f() { git log --graph --pretty='tformat:%C(always,yellow)%h%C(always,reset) %C(always,green)%ar%C(always,reset){%C(always,bold blue)%an%C(always,reset){%C(always,red)%d%C(always,reset) %s' \"$@\" | column -t -s '{' | less -XS; }; f"
```

I wish I could get rid of the shell utilities (`column` and `less`), but they're
necessary to properly align the columns.

I also tried to get rid of the function wrapper (`f()`): it works when you run
`git ll`. However when you run `git ll .` (=display the commit history from
files underneath the current directory only) it fails:

```
% git ll .
. is a directory
```

Therefore it's better to keep it around. I am satisfied with the current form.

The output looks like this (image from upstream):

![git ll output](https://substackcdn.com/image/fetch/$s_!1Mdk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf41b48e-523f-4f82-abc0-db4b1d27c689_2310x1374.png)

**Update(2025-08-21)**: The following modification is better[^2] and has no
external dependencies:

```ini
[alias]
  ll = log --graph --pretty=tformat:'%C(always,yellow)%h%C(always,reset) %C(always,green)%<(25,trunc)%ar%C(always,reset) %C(always,bold blue)%<(20,trunc)%an%C(always,reset) %C(always,red)%d%C(always,reset) %s'
```

[^1]: His original configuration is a separate shell function, which is
    completely unnecessary. A git alias suffices. Keep it simple!

[^2]: In the original implementation, `git ll .` did not work as expected
    (i.e. it did not display changes _only_ from the current directory).

