# Formatting git log — Git

Source: https://www.geekswithgeeks.com/en/git/git-log-formatting

> Shape the log output to actually be useful.

## A readable graph

A one-line, graphed, colored log is far easier to scan than the default verbose output.

```bash
git log --oneline --graph --all --decorate
```

Output:

```
* a1b2c3d (HEAD -> main) Add landing page
* 9f8e7d6 Initial commit
```

## Make it an alias

Save that long command as `git lg` so you never retype it: `git config --global alias.lg "log --oneline --graph --all"`.
