---
title: "af undo"
description: "Undo your last operation, or the one named"
---

> 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 undo

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

Each change the operation wrote goes back where it found it, as jj's undo takes an operation back, and a change it started is abandoned. It is refused if a change it wrote has been written since, by anyone, or is submitted or landed: a landing is taken back with `af revert`. Your workspace is snapshotted first, as before every command, and its files follow.

## Usage

```text
af undo [OPTIONS] [OPERATION]
```

## Arguments

- `[OPERATION]`

  Operation to undo, by its id or the start of it, as `af op log` shows it; your last one if omitted

## Global options

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

## Examples

```sh
af undo
af undo 3f2a9c1e
```

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