Hi, I'm using the webapp and created a repository on my local computer. Then I created another remote repository (encrypted remote with gcrypt), this remote repository is selected as type "full backup".
I've added some files to the local repository, then changed some of them and watched the sync happen. Then I deleted some files, and these also get synced to the remote.
Now, how can I recover those files from the foreign repo, using the webapp or the command line? I could not find any solution.
I tried: git log --diff-filter=D --summary and then git checkout 488408bfcd58eced685d9e3ca5daf55250850f5d -- . to recover the file listed in this remote but got the following response: fatal: This operation must be run in a work tree
What do I miss and how does the "Restore" part work when using "full backup" remote repository?
git annex indirect
to switch to indirect mode, your git commands will work then.Using git does not affect the timestamps or other metadata of files stored by git-annex, which git knows nothing about. It will perhaps change the timestamps of the symlinks that git changes. It you really wanted to avoid that, you could
git clone
the repository and do all the git commands in the clone of the repository, without touching the original repo.Whether commands like
git checkout
andgit revert
are intuitive depends on how intuitive you find git, I suppose. It sure seems more intuitive to me to reuse git commands that work just fine, rather than adding a whole new set of commands.If git-annex target user community are the ones with some level of git know-how, then you may be right. But I'm not one of them. The only time I use git is to clone a repo from the internet when I want to compile latest source code. Nothing more. Reverting etc are alien to me.
Besides, what happens if there are multiple files in a commit but you want to revert only one file? This may be a stupid question if git is able to filter files when reverting, but accept my apologies if so, since I do not know git.
I simply want to use git-annex to sync files, keeping some versions of the files in case needed.