---
title: "af log"
description: "Show commit history as a graph"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.forge.workreef.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# af log

<!-- Generated by tools/gen-reference.mjs from `af log --help`. Change the help text in crates/atoll-forge-cli/src/main.rs, then run `npm run gen:reference`. -->

Prints the commits that a revset selects, drawn as a graph: main's history, and changes selected by ID. Only what you may read is shown. Paths in the revset are relative to the repository root.

In a workspace, `@` is the commit it is at, drawn as `@`: its change's latest commit, with your edits snapshotted first, or the commit of main its files are from. By default the log shows main's history and what leads to `@`.

## Usage

```text
af log [OPTIONS]
```

## Options

- `-r, --revisions <REVISIONS>`

  Revset selecting the commits to show

  Default: `"::main | ::present(@)"`

- `-n, --limit <LIMIT>`

  Maximum number of commits to show, newest first

  Default: `20`

## Global options

Every `af` command also takes the [global options](https://docs.forge.workreef.dev/reference/af/#global-options).

## Examples

```sh
af log
af log -r '::@' -n 10
```

Source: https://docs.forge.workreef.dev/reference/af/log/index.mdx
