Skip to content

af purge

Request permanent removal of a file's contents from history

Purges the contents that PATH has in the commits selected by –revisions. Those contents are deleted wherever they appear, and every commit keeps its ID. The request is refused while main or an open or submitted change still holds the contents: land a change that removes them first.

Acts on the repository given by –repository, or the current workspace’s. Requires an administrator; it takes effect at once unless the forge requires a second administrator.

Usage

af purge [OPTIONS] --revisions <REVISIONS> --reason <REASON> <PATH>

Arguments

  • <PATH>

    Path of the file, from the repository root

Options

  • -r, --revisions <REVISIONS>

    Revset selecting the commits whose contents of PATH are purged

  • --reason <REASON>

    Reason for the purge, kept permanently in the organization’s log

    It must not repeat any of the purged contents.

Global options

Every af command also takes the global options.

Examples

af purge settings.ini -r 'main-' --reason "a password was committed"

Type to search…

↑↓ navigate↵ selectEsc close