---
title: "af rebase"
description: "Move a change, and your open changes built on it, onto other commits"
---

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

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

Destinations can be open or submitted changes, or main's tip (or the root commit, before anything has landed); a change can't be based on an older commit of main. Naming more than one destination makes the change a merge. The rebase is refused if any of the changes has moved since you last saw it.

## Usage

```text
af rebase [OPTIONS] --onto <ONTO>
```

## Options

- `-s, --source <SOURCE>`

  Revset selecting the change to move; defaults to the workspace's change

- `-o, --onto <ONTO>`

  Revset selecting a destination; repeat to make a merge

  Aliases: `-d`, `--destination`

## Global options

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

## Examples

```sh
af rebase -s kxqpzvom -o main
```

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