DOKK / manpages / debian 11 / git-annex / git-annex-matching-expression.1.en
git-annex-matching-expression(1) General Commands Manual git-annex-matching-expression(1)

git-annex-matching-expression - specifying a set of files

The annex.largefiles and annex.addunlocked configurations both use expressions that match some files in the working tree.

The format of these expressions is similar to git-annex-preferred-content(1) expressions.

For example:


largerthan=100kb and not (include=*.c or include=*.h)

This matches large files, but excludes C source files.

The following terms can be used:

Specify files to include or exclude.
The glob can contain * and ? to match arbitrary characters.
Note that this matches on the whole filename, relative to the top of the git directory. So, include=foo will include a file foo in the top, but not subdir/foo. To include both, use include=foo or include=*/foo
Matches only files smaller than, or larger than the specified size.
The size can be specified with any commonly used units, for example, "0.5 gb" or "100 KiloBytes"
Looks up the MIME type of a file, and checks if the glob matches it.
For example, "mimetype=text/*" will match many varieties of text files, including "text/plain", but also "text/x-shellscript", "text/x-makefile", etc.
The MIME types are the same that are displayed by running file --mime-type
This is only available to use when git-annex was built with the MagicMime build flag.
Looks up the MIME encoding of a file, and checks if the glob matches it.
For example, "mimeencoding=binary" will match many kinds of binary files.
The MIME encodings are the same that are displayed by running file --mime-encoding
This is only available to use when git-annex was built with the MagicMime build flag.
Matches any file.
Matches no files. (Same as "not anything")
Inverts what the expression matches.
These can be used to build up more complicated expressions.

git-annex(1)

Joey Hess <id@joeyh.name>

<http://git-annex.branchable.com/>