---
title: "af restore"
description: "Restore files in the workspace's change from another commit"
---

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

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

By default every file is restored from the change's parents, undoing the change's edits. Name PATHS to restore only those files, or use --from to restore from a different commit. The files on disk are updated to match.

## Usage

```text
af restore [OPTIONS] [PATHS]...
```

## Arguments

- `[PATHS]...`

  Glob patterns, from the repository root, selecting the files to restore; all if omitted

## Options

- `--from <FROM>`

  Commit to restore from, in hex; defaults to the change's parents

## Global options

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

## Examples

```sh
af restore src/parser.rs
af restore --from main src/parser.rs
```

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