GitAliases.

GitCreateBranch(ICakeContext, DirectoryPath, string, bool) Method

Summary

Creates a local Branch.
Assembly
Cake.Git.dll
Namespace
Cake.Git
Containing Type
GitAliases

Syntax

public static GitBranch GitCreateBranch(this ICakeContext context, DirectoryPath repositoryDirectoryPath, string branchName, bool checkOut)

Examples

var repositoryDirectoryPath = DirectoryPath.FromString(".");
var currentBranch = ((ICakeContext)cakeContext).GitCreateBranch(repositoryDirectoryPath, "FooBar", true);

Attributes

Type Description
CakeMethodAliasAttribute
CakeAliasCategoryAttribute

Parameters

Name Type Description
context ICakeContext The context.
repositoryDirectoryPath DirectoryPath Path to repository.
branchName string Branch name to create.
checkOut bool Option to checkout after branch creation.

Return Value

Type Description
GitBranch