From d53e29f75fa840d5b41d61e74b824a92d45d5753 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 13 Jan 2015 16:38:19 -0400 Subject: [PATCH] there are now at least 3 ways to do this; explain and close --- ...rsion_in_direct_mode___40__VFAT__41__.mdwn | 4 +++- ...Versions_of_a_File_From_a_Direct_Repo.mdwn | 24 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/doc/bugs/Revert_to_old_file_version_in_direct_mode___40__VFAT__41__.mdwn b/doc/bugs/Revert_to_old_file_version_in_direct_mode___40__VFAT__41__.mdwn index 38eb9e28c8..4a3b1199ba 100644 --- a/doc/bugs/Revert_to_old_file_version_in_direct_mode___40__VFAT__41__.mdwn +++ b/doc/bugs/Revert_to_old_file_version_in_direct_mode___40__VFAT__41__.mdwn @@ -24,4 +24,6 @@ Linux 3.14.3 > VFAT is a crippled file system. I am not going to reimplenent all of git > to support it. The suggested method won't work; git-annex would need -> to add a git-annex revert, etc, etc, etc ad infinitum. [[wontfix|done]] --[[Joey]] +> to add a git-annex revert, etc, etc, etc ad infinitum +> +> Instead, see the `git annex proxy` command. [[done]] --[[Joey]] diff --git a/doc/todo/A_Way_To_Extract_Previous_Versions_of_a_File_From_a_Direct_Repo.mdwn b/doc/todo/A_Way_To_Extract_Previous_Versions_of_a_File_From_a_Direct_Repo.mdwn index 00f500d100..c8c2dd83e2 100644 --- a/doc/todo/A_Way_To_Extract_Previous_Versions_of_a_File_From_a_Direct_Repo.mdwn +++ b/doc/todo/A_Way_To_Extract_Previous_Versions_of_a_File_From_a_Direct_Repo.mdwn @@ -1 +1,25 @@ One problem I keep having when using a direct repo is that in order to get to the previous versions of a file you have to convert that repo to indirect and then checkout previous commits this becomes problematic when the repo in question is large conversion takes a long time and applications gets confused if there are open files from the repo as they go from actual files to symlinks. Is it possible to have a separate annex command that will checkout a previous version of a file to a different directory so we can replace/inspect it. + +> I recently added a `git annex proxy` command, which can be used +> to amoung other things, rewind a direct mode repo to have some old +> version checked out. +> +> For example, you can do: `git annex proxy git checkout old-version` +> And then the old version of all annexed files will be checked out. +> +> If the old version of a file is not available, it'll be a broken +> symlink and you can then use `git annex get` etc to get the content from +> some remote. +> +> Once you have the old version of the file, you can +> make a copy, and then switch back to the present with `git annex proxy +> git checkout annex/direct/master`. Then you can add the copy of the old +> version of the file to the repo, or whatever. +> +> Or, sometimes more simply, you can `git annex proxy git revert $commit` +> to revert a commit that made an unwanted change to a file. +> +> Or, simpler still, `git annex undo $file` will undo the last change +> that git-annex committed to that file, bringing back the old version. +> +> So, this seems [[done]]! --[[Joey]]