I use the assistant with a local directory in direct mode. I have read in different places that direct mode does not ensure that past versions of files are preserved.
What precisely happens to past versions? Under which conditions are past versions kept?
How would I go about retrieving the past version of a file in direct mode?
If you change a direct mode file and that file has not yet been transferred to some other repository, you've changed the only copy of the file, and so you cannot get back the old version.
Other than that, git-annex always preserves old versions of direct mode files, the same as it preserves old versions of indirect mode files.
To get back an old version of a file, use
git annex indirect
to get out of direct mode, use regular git commands to check out the version of the repository that has the file you need, and usegit annex get
to retrieve the file if it's not available in the local repository.git annex unused
andgit annex dropunused
to remove old versions of files.So I have a local repository on my MBP and a backup repository on S3. How do I now restore OLD or deleted file versions on my MBP with git-annex assistant?