gitgit-annex

how to realize owncloud-like history preserving with git-annex


Owncloud allows to preserve only certain parts of the file history in order to optimize space consumption, e.g. for the last week keep two versions a day, for the last month one version a week, and so on.

How do I realize a similar behavior with git-annex, e.g. a cronjob that runs each night and drops all undesired file contents of previous file versions from all (special-) remotes, so that they don't consume any disk space at all?


Solution

  • On this subject the git-annex website seems to be in error at present. I note that, according to the website, you should be able to call

    git annex sync --content --all
    

    to have git-annex consider all files, including unused files, as it computes the files to transfer according to your preferred content rules, but for me git-annex complains that --all is not an option for sync.

    If that did work, you could then build a preferred content rule, perhaps even using time data. I'm not certain about that aspect