.TH git-annex-undo 1 .SH NAME git-annex-undo \- undo last change to a file or directory .PP .SH SYNOPSIS git annex \fB[filename|directory] ...\fP .PP .SH DESCRIPTION When passed a filename, undoes the last change that was made to that file. .PP When passed a directory, undoes the last change that was made to the contents of that directory. .PP 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. .PP Note that this does not undo get/drop of a file's content; it only operates on the file tree committed to git. .PP .SH OPTIONS .IP "\fB\-\-json\fP" .IP Enable JSON output. This is intended to be parsed by programs that use git-annex. Each line of output is a JSON object. .IP .IP "\fB\-\-json\-error\-messages\fP" Messages that would normally be output to standard error are included in the JSON instead. .IP .IP "The git-annex\-common\-options(1) can also be used." .SH SEE ALSO git-annex(1) .PP git-annex\-add(1) .PP .SH AUTHOR Joey Hess .PP .PP