git-annex-...-expression(1)
β¨ NAME β¨</p>
git-annex-matching-expression β specifying a set of files π
so likeβ¦ the manual page here is git-annex-...-expression(1), from the General Commands Manual, and it's about picking out which files match π
π¦ DESCRIPTION π¦
okay bestie, listen. Both the annex.largefiles and annex.addunlocked configs use expressions that match some files in the working tree. That's the whole vibe of this page β teaching you the language of those expressions so you can tell git-annex exactly which files you mean. π
πΈ SYNTAX πΈ
The format of these expressions is similar to git-annex-preferred-content(1) expressions. iykyk π
For example:
largerthan=100kb and not (include=*.c or include=*.h)
This matches large files, but excludes C source files. iconic behaviour, honestly β¨
The following terms can be used:
include=glob/exclude=globβ 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=foowill include a filefooin the top, but notsubdir/foo. To include both, useinclude=foo or include=*/fooπ«Ά
- The glob can contain
smallerthan=size/largerthan=sizeβ 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"π
- The size can be specified with any commonly used units, for example,
mimetype=globβ 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 only matches when the content of the file is present in the local repository. Usually that is the case, but eg, when importing from a special remote with
--no-content, the content is usually not present. not me finding out the hard way π - > π This is only available to use when git-annex was built with the
MagicMimebuild flag.
- For example,
mimeencoding=globβ 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 only matches when the content of the file is present in the local repository. Usually that is the case, but eg, when importing from a special remote with
--no-content, the content is usually not present. - > π This is only available to use when git-annex was built with the
MagicMimebuild flag.
- For example,
anythingβ Matches any file. main character energy, matches literally everything πnothingβ Matches no files. (Same as"not anything") π«₯not expressionβ Inverts what the expression matches. πand/or/( expression )β These can be used to build up more complicated expressions. nesting time, bestie π§
π SEE ALSO π
π AUTHOR π
Joey Hess <id@joeyh.name>
<http://git-annex.branchable.com/>
and that's the whole page, bestie β it's git-annex-...-expression(1) from the General Commands Manual, signed off with all the love in the world πβ¨ go forth and match some files, you've got this fr fr π
π¦ where this page comes from
- alpine 3.24: git-annex-doc 10.20261026-r0 Β· AGPL-3.0-or-later
- arch rolling: git-annex 10.20261026-2 Β· AGPL-3.0-only
- debian trixie: git-annex 10.20250416-2 Β· AGPL-3.0-or-later
- debian trixie: git-annex 10.20250416-2+deb13u1 Β· AGPL-3.0-or-later
- epel 10: git-annex 10.20250320-1.el10_0 Β· AGPL-3.0-or-later
- fedora 43: git-annex 10.20250630-4.fc43 Β· AGPL-3.0-or-later
- fedora 43: git-annex 10.20250929-5.fc43 Β· AGPL-3.0-or-later
- fedora 44: git-annex 10.20260115-1.fc44 Β· AGPL-3.0-or-later
- nixos 26.05: git-annex 10.20260421
- nixpkgs unstable: git-annex 10.20260421
- opensuse-leap 16.0: git-annex 10.20250828-bp160.1.1 Β· AGPL-3.0-or-later AND GPL-3.0-or-later AND BSD-2-Clause AND MIT AND GPL-2.0-only
- opensuse-leap 16.0: git-annex 10.20250828-bp160.1.1 Β· AGPL-3.0-or-later AND GPL-3.0-or-later AND BSD-2-Clause AND MIT AND GPL-2.0-only
- opensuse-leap 16.0: git-annex 10.20250828-bp160.1.1 Β· AGPL-3.0-or-later AND GPL-3.0-or-later AND BSD-2-Clause AND MIT AND GPL-2.0-only
- ubuntu questing: git-annex 10.20250721-1
- ubuntu resolute: git-annex 10.20251029-1ubuntu1 Β· AGPL-3.0-or-later
- ubuntu stonking: git-annex 10.20251029-1ubuntu1 Β· AGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms