diff options
author | https://id.koumbit.net/anarcat <https://id.koumbit.net/anarcat@web> | 2015-02-15 05:49:35 +0000 |
---|---|---|
committer | admin <admin@branchable.com> | 2015-02-15 05:49:35 +0000 |
commit | 42977075e5e964ae4c483f14291cefa22f743d50 (patch) | |
tree | d2c78f03b1168a90f670935f1235a3b7f72d0c86 /doc/direct_mode.mdwn | |
parent | 41f14f0522e213e01883973902e4a52e96752b8d (diff) |
hmm... seems like undo respects unstaged changes after all, ohwell
Diffstat (limited to 'doc/direct_mode.mdwn')
-rw-r--r-- | doc/direct_mode.mdwn | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/doc/direct_mode.mdwn b/doc/direct_mode.mdwn index 215f5da8f..d22c2ba5e 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 |