GlobalConfigOperations
Defined in: src/core/git.ts:284
Global config operations
Wraps: git config --global subcommands
Operates on ~/.gitconfig (user-level configuration). Uses the same typed ConfigSchema as repository-level config.
Methods
add()
add<
K>(key,value,opts?):Promise<void>
Defined in: src/core/git.ts:313
Add a value to a typed multi-valued global config key
Wraps: git config --global --add <key> <value>
Type Parameters
K
K extends keyof ConfigSchema
Parameters
key
K
value
ConfigSchema[K]
opts?
Returns
Promise<void>
get()
get<
K>(key,opts?):Promise<ConfigSchema[K] |undefined>
Defined in: src/core/git.ts:292
Get a typed global config value
Wraps: git config --global --get <key>
Type Parameters
K
K extends keyof ConfigSchema
Parameters
key
K
opts?
Returns
Promise<ConfigSchema[K] | undefined>
Config value or undefined if not set
getAll()
getAll<
K>(key,opts?):Promise<ConfigSchema[K][]>
Defined in: src/core/git.ts:299
Get all values for a typed multi-valued global config key
Wraps: git config --global --get-all <key>
Type Parameters
K
K extends keyof ConfigSchema
Parameters
key
K
opts?
Returns
Promise<ConfigSchema[K][]>
getRaw()
getRaw(
key,opts?):Promise<string|string[] |undefined>
Defined in: src/core/git.ts:329
Get a raw global config value (for arbitrary keys)
Wraps: git config --global --get <key>
Parameters
key
string
opts?
Returns
Promise<string | string[] | undefined>
Config value or undefined if not set
list()
list(
opts?):Promise<ConfigEntry[]>
Defined in: src/core/git.ts:350
List all global config values
Wraps: git config --global --list
Parameters
opts?
GlobalConfigListOpts & ExecOpts
Returns
Promise<ConfigEntry[]>
set()
set<
K>(key,value,opts?):Promise<void>
Defined in: src/core/git.ts:306
Set a typed global config value
Wraps: git config --global <key> <value>
Type Parameters
K
K extends keyof ConfigSchema
Parameters
key
K
value
ConfigSchema[K]
opts?
Returns
Promise<void>
setRaw()
setRaw(
key,value,opts?):Promise<void>
Defined in: src/core/git.ts:336
Set a raw global config value (for arbitrary keys)
Wraps: git config --global <key> <value>
Parameters
key
string
value
string
opts?
Returns
Promise<void>
unset()
unset<
K>(key,opts?):Promise<void>
Defined in: src/core/git.ts:320
Unset a typed global config value
Wraps: git config --global --unset <key>
Type Parameters
K
K extends keyof ConfigSchema
Parameters
key
K
opts?
Returns
Promise<void>
unsetRaw()
unsetRaw(
key,opts?):Promise<void>
Defined in: src/core/git.ts:343
Unset a raw global config value (for arbitrary keys)
Wraps: git config --global --unset <key>
Parameters
key
string
opts?
Returns
Promise<void>