diff --git a/doc/direct_mode.mdwn b/doc/direct_mode.mdwn index 215f5da8f3..d22c2ba5e4 100644 --- a/doc/direct_mode.mdwn +++ b/doc/direct_mode.mdwn @@ -110,16 +110,7 @@ There is also the `undo` command to do the equivalent of the above revert in a s git annex undo file -to revert the last committed change to `file` in direct mode. Note that if the file is marked as modified and *not* committed, this may not do what you expect and may very well revert the *previous* change to that file! So first check if the file is actually committed: - - $ git annex status file # check if the file was committed - M file - $ # uh-oh, not running the assistant or the file wasn't added! - $ git annex add file # make sure we commit the working copy so we revert *that* - $ git annex status file # look how that change is now committed - $ git annex undo file # okay, good to go, now we're reverting to the previous version - -If you would have skipped that `git annex add`, above, you would have revert to the version *before* the version that was before the modified version! In other words, two versions before! Note that you can use the `--depth` flag to revert even earlier versions of the file. +to revert the last change to `file`. Note that you can use the `--depth` flag to revert earlier versions of the file. ## forcing git to use the work tree in direct mode