Is there a way to declare (init) a git-annex-only repository?
I mean if the repository will only contain large (or maybe binary) files without any source-code... In that case all files added to the repo should be managed by git-annex automatically. Is this currently possible?
Yes, you can do this. Simply set up a git annex repo and you are ready to go. If you have the assistant running in the background it will take care of committing and distributing the files around.
What do you mean by track?
If you are using the assistant, it will take care for you. It will add, commit and distribute files.
If you are using the command line without the assistant, you should have a look at the walkthrough. You can play around with repositories in /tmp before you push all your important data into it
Thanks I'll take a look at git-annex assistant, all new to me
Never mind about track, I thought git-annex is similar to git-lfs where you should manually call "track..." on files whose content should not be added to git...
cool thanks
Is it also possible to version control large binary files using git-annex assistant ??
I mean to be able to switch back to earlier versions when needed...
Is there something like a way to specify how many older versions should be kept in the repo? This would be a nice feature for preserving disk space...
git-annex doesn't deliberately keep all versions of the files. however, if you change a file (using git-annex-edit), it will keep the old copy, which will become unused data. that data will be purged by the assistant after a while (if configured to do so) but you can also archive it, etc...
so in a way, yes, it is versionned, but the unused data is somewhat more 'brittle' than the current dataset.
Is it possible to force git-annex to keep all versions for some or all files??
Or (maybe better) specify how many old versions to keep (for example keep the last 20 versions or so...) ?
If you use indirect mode, and avoid passing --force to any git-annex commands, then git-annex will ensure that it always keeps all versions of all files.
Any command that would delete any data requires the --force option.
If your repo uses direct mode, we can't make this guarantee, because the files are left directly in your work tree and you can edit or delete them manually and there's nothing git-annex can do to stop that.
There is not currently a way to keep a particular number of old versions of a file. This comes down to picking the versions to keep or drop when running
git annex dropunused
(with --force of course).If using git-annex sync or git-annex merge to do the merging, it will automatically resolve the merge conflict and put both conflicting versions of the file in the tree under different filenames.
Of course, you can also use regular git commands to pull and merge your master branch; then you'd get a regular git merge conflict.