git-annex-undo(1)
β¨ git-annex-undo(1) β¨
okay bestie, this one's from the General Commands Manual, and it's the git-annex-undo page β yes, the deprecated one π but we're still gonna read it together, no skipping, iykyk.
π NAME π
git-annex-undo β undo the last change to a file or directory (deprecated!!)
π SYNOPSIS π
git annex [filename|directory] ...
(yes there are two spaces after annex, that's the original, we don't touch it π«Ά)
π¦ DESCRIPTION π¦
okay so here's the vibe:
- when you pass it a filename, it undoes the last change that was made to that file.
- when you pass it a directory, it undoes the last change that was made to the contents of that directory.
and here's the iconic part: running undo a second time will undo the undo, putting the working tree right back 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 β like, it commits them first, that's just how it do.
β οΈ heads up bestie: this does not undoget/dropof a file's content. it only operates on the file tree committed to git. so don't come for it about your content, it's a file-tree girlie π
and ngl, the big one: this command is deprecated π β the same things can be done in other ways using usual git commands. so like, it still works, but it's giving retired main character energy.
π OPTIONS π
--jsonβ enable JSON output. it's meant to be parsed by programs that use git-annex, so every single line of output is a JSON object β¨.--json-error-messagesβ messages that would normally be output to standard error get included in the JSON instead π«Ά.
also, the git-annex-common-options(1) can be used too, so go off with those π
π₯ SEE ALSO π₯
π AUTHOR π
Joey Hess <id@joeyh.name> β periodt π
so yeah, that's the whole page, and it's from the git-annex-undo(1) manual (General Commands Manual, git-annex-undo(1)), which is literally the same name as the page itself β cute little full-circle moment π slay, go undo something (or don't, it's deprecated bestie) π¦π
π¦ where this page comes from
- alpine 3.24: git-annex-doc 10.20261026-r0 Β· AGPL-3.0-or-later
- arch rolling: git-annex 10.20261026-2 Β· AGPL-3.0-only
- nixos 26.05: git-annex 10.20260421
- nixpkgs unstable: git-annex 10.20260421
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms