public interface

GitMerge

com.atlassian.bitbucket.scm.git.command.merge.GitMerge

Class Overview

An interim builder to allow callers to choose between a normal git merge and a squashing merge. Each option returns a builder with methods tailored to include only those options which are appropriate for the type of merge being performed.

Summary

Public Methods
@Nonnull GitMergeBuilder normal()
Creates a builder which can be used to create a command for running git merge.
@Nonnull GitSquashMergeBuilder squash()
Creates a builder which can be used to create a command for running git merge --squash, which will not produce a merge commit and, instead, will merge incoming changes into the work tree and then exit.

Public Methods

@Nonnull public GitMergeBuilder normal ()

Creates a builder which can be used to create a command for running git merge. Whether or not a merge commit is created will depend on the configuration of the created command, and on the commits being merged.

Returns
  • a new builder for creating a merge command

@Nonnull public GitSquashMergeBuilder squash ()

Creates a builder which can be used to create a command for running git merge --squash, which will not produce a merge commit and, instead, will merge incoming changes into the work tree and then exit.

When using git merge --squash, the commit must be performed explicitly. Prior to committing the changes, arbitrary additional work can be done, as well as directly controlling the commit details.

Returns
  • a new builder for creating a squashing merge command