GitAliases.

GitRemotes(ICakeContext, DirectoryPath) Method

Summary

Gets a Git repository's remotes.
Assembly
Cake.Git.dll
Namespace
Cake.Git
Containing Type
GitAliases

Syntax

public static IReadOnlyList<GitRemote> GitRemotes(this ICakeContext context, DirectoryPath repositoryDirectoryPath)

Examples

var remotes = GitRemotes("c:/myrepo");
Information("Found remotes: {0}", string.Join(", ", remotes.Select(x => x.Name + " -> " + x.Url)));

Attributes

Type Description
CakeMethodAliasAttribute
CakeAliasCategoryAttribute

Parameters

Name Type Description
context ICakeContext The context.
repositoryDirectoryPath DirectoryPath Path to repository.

Return Value

Type Description
IReadOnlyList<GitRemote> A list of Cake.Git.GitAliases.GitRemote(Cake.Core.ICakeContext,Cake.Core.IO.DirectoryPath,System.String) objects for the specified repository.