GitIgnoreMatcherOptions Class

Options for GitIgnoreMatcher.

public sealed class GitIgnoreMatcherOptions

Constructors

NameDescription
GitIgnoreMatcherOptions()

GitIgnoreMatcherOptions()

GitIgnoreMatcherOptions.cs
public GitIgnoreMatcherOptions()

No documentation is available.

Properties

NameDescription
GlobalExcludesFileGets or sets the path of the global excludes file, which git reads from the core.excludesFile setting. The default value is null: no global excludes file is read.
UseRepositoryExcludeFileGets or sets a value indicating whether the info/exclude file of the git directory of the repository is read. The default value is true.

GlobalExcludesFile

GitIgnoreMatcherOptions.cs

Gets or sets the path of the global excludes file, which git reads from the core.excludesFile setting. The default value is null: no global excludes file is read.

public string? GlobalExcludesFile { get; set; }

Property value

string?

Remarks

GitIgnoreMatcher does not read the git configuration. When core.excludesFile is not set, git reads $XDG_CONFIG_HOME/git/ignore, or ~/.config/git/ignore when XDG_CONFIG_HOME is not set. A file that does not exist is skipped.

UseRepositoryExcludeFile

GitIgnoreMatcherOptions.cs

Gets or sets a value indicating whether the info/exclude file of the git directory of the repository is read. The default value is true.

public bool UseRepositoryExcludeFile { get; set; }

Property value

bool

Remarks

The git directory is the .git directory of the root directory. When .git is a file, as in a worktree or a submodule, the file is read from the common git directory it points to.