Skip to content

af revert

Undo a landing on main

Creates a new open change on main that reverses the landing’s edits. Where main has since changed the same content, the new change contains conflicts for you to resolve before you submit it.

Usage

af revert [OPTIONS] --revision <REVISION>

Options

  • -r, --revision <REVISION>

    Revset selecting the landing to undo

  • -m, --message <MESSAGE>

    Description of the new change; defaults to one that names the reverted landing

  • --change <CHANGE>

    Change ID for the new change, as 32 letters k to z; a new one if omitted

    Choosing the ID makes retries safe: retrying with the same ID never creates a second change.

Global options

Every af command also takes the global options.

Examples

af revert -r main -m "Revert the broken parser"

Type to search…

↑↓ navigate↵ selectEsc close