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 undo get/drop of 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