From bf747bd5ac184b920ce2c9473ee0097464b4a2e6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 17 Oct 2016 15:29:49 -0400 Subject: response --- ...comment_3_ac1369c0417c1dc5f1b41b5cc88fe2fd._comment | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 doc/git-annex-undo/comment_3_ac1369c0417c1dc5f1b41b5cc88fe2fd._comment diff --git a/doc/git-annex-undo/comment_3_ac1369c0417c1dc5f1b41b5cc88fe2fd._comment b/doc/git-annex-undo/comment_3_ac1369c0417c1dc5f1b41b5cc88fe2fd._comment new file mode 100644 index 000000000..acf1a0f85 --- /dev/null +++ b/doc/git-annex-undo/comment_3_ac1369c0417c1dc5f1b41b5cc88fe2fd._comment @@ -0,0 +1,18 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 3""" + date="2016-10-17T19:24:35Z" + content=""" +`git annex undo` undoes the last change that was committed to the file. +If the file has staged changes, `git annex undo` first commits those +changes (to avoid losing data) and then undoes that commit. + +The reason that `git annex undo` deleted the files from your working tree +is that the previous commit did not have those files in it, and it undid +to the state at that commit. + +So, you will never lose the content of a file by running `git annex undo`. +If `git annex undo` deletes a file, you can always get it back by +checking out a previous version of the branch. Or even by running `git +annex undo` a second time, to undo the undo. +"""]] -- cgit v1.2.3