Cake - API - GitAliases.GitBranchCurrent(ICakeContext, DirectoryPath) Method

GitAliases.

GitBranchCurrent(ICakeContext, DirectoryPath) Method

Summary

Gets the current branch.
Assembly
Cake.Git.dll
Namespace
Cake.Git
Containing Type
GitAliases

Syntax

public static GitBranch GitBranchCurrent(this ICakeContext context, DirectoryPath repositoryDirectoryPath)

Examples

var repositoryDirectoryPath = DirectoryPath.FromString(".");
var currentBranch = ((ICakeContext)cakeContext).GitBranchCurrent(repositoryDirectoryPath);

Attributes

Type Description
CakeMethodAliasAttribute
CakeAliasCategoryAttribute

Parameters

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

Return Value

Type Description
GitBranch GitBranch.