Cake - API - GitAliases.GitReset(ICakeContext, DirectoryPath, GitResetMode, string) Method

GitAliases.

GitReset(ICakeContext, DirectoryPath, GitResetMode, string) Method

Summary

Sets the current branch head (HEAD) to a specified commit, optionally modifying index and working tree to match.
Assembly
Cake.Git.dll
Namespace
Cake.Git
Containing Type
GitAliases

Syntax

public static void GitReset(this ICakeContext context, DirectoryPath repositoryDirectoryPath, GitResetMode mode, string commitId)

Examples

GitReset("c:/temp/cake", GitResetMode.Hard, "commit id");

Attributes

Type Description
CakeMethodAliasAttribute
CakeAliasCategoryAttribute

Parameters

Name Type Description
context ICakeContext The context.
repositoryDirectoryPath DirectoryPath Path to repository.
mode GitResetMode The effect that the reset action should have on the the index and working tree.
commitId string The id of the commit to which the current branch HEAD should be set.

Return Value

Type Description
void