git-annex-unused(1) | General Commands Manual | git-annex-unused(1) |
git-annex-unused - look for unused file content
git annex unused
Checks the annex for data that does not correspond to any files present in any tag or branch, and prints a numbered list of the data.
After running this command, you can use the --unused option with many other git-annex commands to operate on all the unused data that was found.
For example, to move all unused data to origin:
git annex unused; git annex move --unused --to origin
The refspec format for --used-refspec is a colon-separated list of additions and removals of refs. For example:
+refs/heads/*:+HEAD^:+refs/tags/*:-refs/tags/old-tag
This adds all refs/heads/ refs, as well as the previous version of HEAD. It also adds all tags, except for old-tag.
The refspec is processed by starting with an empty set of refs, and walking the list in order from left to right.
Each + using a glob is matched against all relevant refs (a subset of git show-ref) and all matching refs are added to the set. For example, "+refs/remotes/*" adds all remote refs.
Each + without a glob adds the literal value to the set. For example, "+HEAD^" adds "HEAD^".
Each - is matched against the set of refs accumulated so far. Any refs with names that match are removed from the set.
"reflog" adds all the refs from the reflog. This will make past versions of files not be considered to be unused until the ref expires from the reflog (by default for 90 days). Note that this may make git-annex unused take some time to complete, it if needs to check every ref from the reflog.
Joey Hess <id@joeyh.name>