2015-03-24 19:23:59 +00:00
|
|
|
# NAME
|
|
|
|
|
|
|
|
git-annex unused - look for unused file content
|
|
|
|
|
|
|
|
# SYNOPSIS
|
|
|
|
|
|
|
|
git annex unused
|
|
|
|
|
|
|
|
# DESCRIPTION
|
|
|
|
|
|
|
|
Checks the annex for data that does not correspond to any files present
|
2021-05-10 19:21:23 +00:00
|
|
|
in any tag or branch, or in the git index, and prints a numbered list
|
|
|
|
of the data.
|
2015-03-24 19:23:59 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
# OPTIONS
|
|
|
|
|
|
|
|
* `--fast`
|
|
|
|
|
|
|
|
Only show unused temp and bad files.
|
|
|
|
|
2018-07-11 20:01:35 +00:00
|
|
|
* `--from=repository`
|
2015-03-24 19:23:59 +00:00
|
|
|
|
2018-07-11 20:01:35 +00:00
|
|
|
Check for unused data that is located in a repository.
|
|
|
|
|
|
|
|
The repository should be specified using the name of a configured remote,
|
|
|
|
or the UUID or description of a repository.
|
2015-05-14 19:31:38 +00:00
|
|
|
|
|
|
|
* `--used-refspec=+ref:-ref`
|
|
|
|
|
2021-05-10 19:21:23 +00:00
|
|
|
By default, any data that the git index uses, or that any refs in the git
|
2015-05-14 19:31:38 +00:00
|
|
|
repository point to is considered to be used. If you only want to use
|
|
|
|
some refs, you can use this option to specify the ones to use. Data that
|
2021-05-10 19:21:23 +00:00
|
|
|
is not in the specified refs (and not used by the index) will then be
|
2015-05-14 19:31:38 +00:00
|
|
|
considered unused.
|
|
|
|
|
2015-05-14 19:44:08 +00:00
|
|
|
The git configuration annex.used-refspec can be used to configure
|
|
|
|
this in a more permanent fashion.
|
|
|
|
|
2021-05-10 19:00:13 +00:00
|
|
|
* Also the [[git-annex-common-options]](1) can be used.
|
|
|
|
|
2015-05-14 19:44:08 +00:00
|
|
|
# REFSPEC FORMAT
|
2015-05-14 19:31:38 +00:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
2015-07-10 20:52:53 +00:00
|
|
|
The refspec is processed by starting with an empty set of refs,
|
2015-05-14 19:31:38 +00:00
|
|
|
and walking the list in order from left to right.
|
|
|
|
|
2015-07-10 20:52:53 +00:00
|
|
|
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.
|
2019-04-09 15:38:11 +00:00
|
|
|
Any refs with names that match are removed from the set.
|
2015-07-10 20:52:53 +00:00
|
|
|
|
|
|
|
"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.
|
2015-03-24 19:23:59 +00:00
|
|
|
|
|
|
|
# SEE ALSO
|
|
|
|
|
|
|
|
[[git-annex]](1)
|
|
|
|
|
2015-05-29 16:12:55 +00:00
|
|
|
[[git-annex-dropunused]](1)
|
|
|
|
|
|
|
|
[[git-annex-addunused]](1)
|
|
|
|
|
2015-03-24 19:23:59 +00:00
|
|
|
# AUTHOR
|
|
|
|
|
|
|
|
Joey Hess <id@joeyh.name>
|
|
|
|
|
|
|
|
Warning: Automatically converted into a man page by mdwn2man. Edit with care.
|