git-annex-undo(1)

git-annex-undo1

Undo last change to a file or directory (deprecated)

Usage

git annex [{filename | directory}] ...

Overview

When passed a filename, undoes the last change that was made to that file.

When passed a directory, undoes the last change that was made to the contents of that directory.

Running undo a second time will undo the undo, returning the working tree to the same state it had before. To support undoing an undo of staged changes, any staged changes are first committed by the undo command.

Note that this does not undo get/drop of a file's content; it only operates on the file tree committed to git.

This command is deprecated, the same things can be done in other ways using usual git commands.

Options

--json

Enable JSON output. This is intended to be parsed by programs that use git-annex. Each line of output is a JSON object.

--json-error-messages

Messages that would normally be output to standard error are included in the JSON instead.

The git-annex-common-options(1) can also be used.

Releases

6 releases since Debian 9 (Stretch); the text changed 3 times.

  1. 9–11
  2. 12
  3. 13
  4. Arch

--json since Debian 13 (Trixie); --json-error-messages since Debian 13 (Trixie).

Author

Joey Hess <[email protected]>

From git-annex 10.20261026-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.