diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-11-04 07:48:10 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-11-04 07:48:10 -0800 |
| commit | 5931b6b2fbfaeceb911296e5f45df95a8c33bdb6 (patch) | |
| tree | 275c9f21bd0a72658e893d4429c4c28bfbd45323 /Documentation | |
| parent | Merge branch 'jk/test-delete-gpgsig-leakfix' (diff) | |
| parent | doc: document backslash in gitignore patterns (diff) | |
| download | git-5931b6b2fbfaeceb911296e5f45df95a8c33bdb6.tar.gz git-5931b6b2fbfaeceb911296e5f45df95a8c33bdb6.zip | |
Merge branch 'jk/doc-backslash-in-exclude'
The patterns used in the .gitignore files use backslash in the way
documented for fnmatch(3); document as such to reduce confusion.
* jk/doc-backslash-in-exclude:
doc: document backslash in gitignore patterns
Diffstat (limited to 'Documentation')
| -rw-r--r-- | Documentation/gitignore.adoc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Documentation/gitignore.adoc b/Documentation/gitignore.adoc index 5e0964ef41..9fccab4ae8 100644 --- a/Documentation/gitignore.adoc +++ b/Documentation/gitignore.adoc @@ -111,6 +111,11 @@ PATTERN FORMAT one of the characters in a range. See fnmatch(3) and the FNM_PATHNAME flag for a more detailed description. + - A backslash ("`\`") can be used to escape any character. E.g., "`\*`" + matches a literal asterisk (and "`\a`" matches "`a`", even though + there is no need for escaping there). As with fnmatch(3), a backslash + at the end of a pattern is an invalid pattern that never matches. + Two consecutive asterisks ("`**`") in patterns matched against full pathname may have special meaning: |
