git-annex/doc/git-annex-undo.mdwn
Joey Hess b184fc490a
split out common options to its own page and mention it on each subcommand page
Sometimes users would get confused because an option they were looking
for was not mentioned on a subcommand's man page, and they had not
noticed that the main git-annex man page had a list of common options.
This change lets each subcommand mention the common options, similarly
to how the matching options are handled.

This commit was sponsored by Svenne Krap on Patreon.
2021-05-10 15:00:13 -04:00

39 lines
866 B
Markdown

# NAME
git-annex undo - undo last change to a file or directory
# SYNOPSIS
git annex `[filename|directory] ...`
# DESCRIPTION
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.
# OPTIONS
* The [[git-annex-common-options]](1) can be used.
# SEE ALSO
[[git-annex]](1)
[[git-annex-add]](1)
# AUTHOR
Joey Hess <id@joeyh.name>
Warning: Automatically converted into a man page by mdwn2man. Edit with care.