I have a repository with an S3 remote named cloud
. I now no longer want to use that remote. I've dropped all the data from it (git annex drop . --from cloud
). How do I tell my repository to forget about the remote?
I have a repository with an S3 remote named cloud
. I now no longer want to use that remote. I've dropped all the data from it (git annex drop . --from cloud
). How do I tell my repository to forget about the remote?
Simple answer: You can't fully delete a remote - with annex commands. You can mark it as dead.
You can give this a try as a workaround: Truly purging dead repositories
Recently git-annex has gotten the ability to do this:
git annex forget --drop-dead
That prunes all history relating to all dead remotes. You need to be running a git-annex that supports this on all computers you use the repos on, or the pruned history will get merged back in.
I don't recommend doing this just because you want to "clean history". Think of it as something you can do at some point in the future if the .git/objects somehow gets too large or too slow. Put off deleting data until tomorrow if you don't absolutely need to do it today.
Actually, it may be a good idea to remove repositories made for tests purposes.
I now have 2 dead repositories that are USB_test1 and USB_test2 that I created before knowing I could reuse the annex uuid.
They are now there and it is difficult to remove them.
For that special case, the --drop-dead feature is very welcome.
I followed these instructions, but a single entry for the targeted UUID persists in vicfg.
For those of us with OCD, this is mildly irksome. Later I might have dead UUID's I actually want to remember, and that bit of spam will always be sitting there at the top of the file.
However, deleting it is still worthwhile, because otherwise it is repeated in every list of remotes.
It may help suppress the OCD to consider that vicfg is listing dead remotes to give you the option to make them not dead anymore.