My annex contains several large files that I have unlocked, edited, and committed again, i.e. the annex contains the version history of those files. However, I don't want the history -- keeping the latest version is good enough for me. Running git annex unused won't detect those old versions, though, because they aren't unused as old Git revisions still refer to them. So I wonder:

  1. What is the best way to get rid of the old versions of files in the annex?

  2. What is the best way to detect old versions of files in the annex?

I guess, I could run git rebase -i to squash commits to those files into one commit, thereby getting rid of the references to the old copies, but that approach feels awkward and error prone. Is anyone aware of a better way?

Sorry for commmenting on my own question ... I think I just figured out that git annex unused does in fact do what I want. When I tried it, it just didn't show the obsolete versions of the files I edited because I hadn't yet synchronized all repositories, so that was why the obsolete versions were still considered used.
Comment by http://peter-simons.myopenid.com/ Thu Feb 9 18:53:00 2012
Yes, contents are still considered used while tags or refs refer to them. Including remote tracking branches like remotes/origin/master
Comment by http://joey.kitenet.net/ Thu Feb 9 19:42:28 2012
Comments on this page are closed.