GitGraphCherryPick Class

Copies a commit of another branch onto the current branch of a Git graph (Mermaid cherry-pick).

public sealed class GitGraphCherryPick : GitGraphOperation
Inheritance
GitGraphOperation GitGraphCherryPick

Constructors

NameDescription
GitGraphCherryPick(string)Initializes a new instance of the GitGraphCherryPick class.

GitGraphCherryPick(string)

GitGraphCherryPick.cs

Initializes a new instance of the GitGraphCherryPick class.

public GitGraphCherryPick(string commitId)

Parameters

commitId string
The identifier of the commit to copy.

Properties

NameDescription
CommitIdGets the identifier of the commit to copy.
ParentGets or sets the parent of a merge commit to copy the changes from, or null. A merge commit needs one.
ShowDefaultTagGets or sets a value that indicates whether a cherry-pick without tags has the tag cherry-pick: and the identifier it copies. The default is true.
TagsGets the tags, drawn above the new commit. Without tags, the commit has the tag cherry-pick: and the identifier it copies, unless GitGraphCherryPick.ShowDefaultTag is false.

Gets the identifier of the commit to copy.

public string CommitId { get; }

Property value

string

Gets or sets the parent of a merge commit to copy the changes from, or null. A merge commit needs one.

public string? Parent { get; set; }

Property value

string?

ShowDefaultTag

GitGraphCherryPick.cs

Gets or sets a value that indicates whether a cherry-pick without tags has the tag cherry-pick: and the identifier it copies. The default is true.

public bool ShowDefaultTag { get; set; }

Property value

bool

Gets the tags, drawn above the new commit. Without tags, the commit has the tag cherry-pick: and the identifier it copies, unless GitGraphCherryPick.ShowDefaultTag is false.

public IList<string> Tags { get; }

Property value

IList<string>