GitAliases.

GitRemote(ICakeContext, DirectoryPath, string) Method

Summary

Gets the specified remote from a Git repository.
Assembly
Cake.Git.dll
Namespace
Cake.Git
Containing Type
GitAliases

Syntax

public static GitRemote GitRemote(this ICakeContext context, DirectoryPath repositoryDirectoryPath, string remoteName)

Examples

GitRemote remote = GitRemote("c:/temp/cake", "origin");
Information(remote.Url);

Attributes

Type Description
CakeMethodAliasAttribute
CakeAliasCategoryAttribute

Parameters

Name Type Description
context ICakeContext The context.
repositoryDirectoryPath DirectoryPath Path to repository.
remoteName string The name of the remote to get.

Return Value

Type Description
GitRemote Information about the requested remote or null if no matching remote was found.