GitAliases.

GitConfigGet<T>(ICakeContext, DirectoryPath, string, T) Method

Summary

Gets the specified configuration value. If the specified value is not found it will return the specified default value.
Assembly
Cake.Git.dll
Namespace
Cake.Git
Containing Type
GitAliases

Syntax

public static T GitConfigGet<T>(this ICakeContext context, DirectoryPath repositoryDirectoryPath, string key, T defaultValue)

Examples

var configValue = GitConfigGet("user.email", "[email protected]");

Attributes

Type Description
CakeMethodAliasAttribute
CakeAliasCategoryAttribute

Type Parameters

Name Description
T The expected type of configuration.

Parameters

Name Type Description
context ICakeContext The context.
repositoryDirectoryPath DirectoryPath Repository path.
key string The configuration key.
defaultValue T The default value to use if the configuration isn't present.

Return Value

Type Description
T The value of the specified configuration key.