Function getConfig

  • Read an entry from the git config files.

    Caveats:

    • Currently only the local $GIT_DIR/config file can be read or written. However support for the global ~/.gitconfig and system $(prefix)/etc/gitconfig will be added in the future.
    • The current parser does not support the more exotic features of the git-config file format such as [include] and [includeIf].

    Returns

    Resolves with the config value.

    Example

    // Read config value
    const value = await getConfig({
    fs,
    dir: '/tutorial',
    path: 'remote.origin.url'
    })
    console.log(value)

    Type Parameters

    • T extends string

    Parameters

    Returns Promise<ConfigValue<T> | undefined>

Generated using TypeDoc