Hi, I'm still wrapping my head around various aspects of the relationship between git and git-annex in everyday use.
I have a set of files whose original filenames I want to keep, but only very rarely work with. That is, the everyday, "normal" use for these files will happen with the filenames changed. I want to have the watcher running in this repository, handling syncing with remotes, changes in filenames and directory structure etc.
How would you set this up? A shared clone (not sure I fully get how that works), a separate branch for the original filenames that is checked out when needed (i.e. everyday changes are committed to master) or something else?
Many thanks!
Depends on how often and what "work" is done with the original filenames. Can you explain more what you are trying to do?
Perhaps you can use metadata/metadata views.. though this would give you the original filename as a directory, containing a file with the current filename. e.g. ~/annex/originalfilename.txt/currentfilename.txt
Thanks for your reply.
One example is when working with scanned images and digitized sound recordings:
The original file names [
unmodified
] are needed to source which analog original they are paired with in an archival system beyond my control, but as I manually work with these files, the structure changes to [modified
], which I'd like to be the repo's default state. So when new data arrives (via a remote) new files should be checked into the [unmodified
] state with their original file names, and then be worked on in the [modified
] state. I'd like this [unmodified
] state to be singular, as opposed to checking out a specific commit for a specific subset of files.Another, perhaps simpler, example is music files: They come in various combinations of file and folder names as they are ripped from CD or downloaded. I'd like an external program (beets) to handle organizing these files (the symlinks, really) into a folder structure, as I need them to be presented in a particular way to an indexer/player, i.e. as [
modified
]. So again, I'd like to ingest (from a remote) into git-annex using the original file names (if needed at a later point) while still letting beets move things around structurally. At some point in time, I'd like to be able to easily hop back to my music library in its [unmodified
] state without having to find the particular point in time when I added that particular subset.I'm trying to achieve this with as little manual massaging as possible.
Metadata and views are a great option to have, but from what I understand not the right fit here.
This was long but I hope it made some sense.
It seems to me that what you are describing is fundamentally a branch, call it "orig". Whenever you add a new file, you do so in a repository with the orig branch checked out. Then you
git merge orig
into a repository with the master branch checked out, and get on with renaming the files.I would be wary of changing the branch that is checked out when the git-annex watcher/assistant is running as that might confuse it. I would probably just make a separate clone of the repository that has the orig branch checked out all the time, do the imports into there, and then
git annex move
the file contents over to the main repository.git checkout orig /path/to/file
from master does the trick nicely.