# Formatting git log — Git Fundamentals: Commits, Branches and Collaboration

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

> Make git log readable with one-line, graph and decorate options and save them as an alias.

## 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"`.
