]> git.ipfire.org Git - thirdparty/git.git/blobdiff - Documentation/config.txt
l10n: fr v2.23.0 round 2
[thirdparty/git.git] / Documentation / config.txt
index 7e2a6f61f593921450c311b05269a3555baa97ad..e3f5bc3396d0c7502f16eed989220c8e2010bcc1 100644 (file)
@@ -144,6 +144,20 @@ refer to linkgit:gitignore[5] for details. For convenience:
        This is the same as `gitdir` except that matching is done
        case-insensitively (e.g. on case-insensitive file sytems)
 
+`onbranch`::
+       The data that follows the keyword `onbranch:` is taken to be a
+       pattern with standard globbing wildcards and two additional
+       ones, `**/` and `/**`, that can match multiple path components.
+       If we are in a worktree where the name of the branch that is
+       currently checked out matches the pattern, the include condition
+       is met.
++
+If the pattern ends with `/`, `**` will be automatically added. For
+example, the pattern `foo/` becomes `foo/**`. In other words, it matches
+all branches that begin with `foo/`. This is useful if your branches are
+organized hierarchically and you would like to apply a configuration to
+all the branches in that hierarchy.
+
 A few more notes on matching via `gitdir` and `gitdir/i`:
 
  * Symlinks in `$GIT_DIR` are not resolved before matching.
@@ -206,6 +220,11 @@ Example
        [includeIf "gitdir:/path/to/group/"]
                path = foo.inc
 
+       ; include only if we are in a worktree where foo-branch is
+       ; currently checked out
+       [includeIf "onbranch:foo-branch"]
+               path = foo.inc
+
 Values
 ~~~~~~