public class FeatureFinishCommand extends AbstractBranchMergingCommand<FeatureFinishCommand,org.eclipse.jgit.api.MergeResult>
This will merge the feature into develop and set the local branch to develop.
Examples (flow is a JGitFlow instance):
Finish a feature:
flow.featureFinish("feature").call();
Don't delete the local feature branch
flow.featureFinish("feature").setKeepBranch(true).call();
Squash all commits on the feature branch into one before merging
flow.featureFinish("feature").setSquash(true).call();
gfConfig, git, reporter, requirementHelper| Constructor and Description |
|---|
FeatureFinishCommand(String branchName,
org.eclipse.jgit.api.Git git,
GitFlowConfiguration gfConfig)
Create a new feature finish command instance.
|
| Modifier and Type | Method and Description |
|---|---|
org.eclipse.jgit.api.MergeResult |
call() |
protected String |
getCommandName() |
FeatureFinishCommand |
setExtension(FeatureFinishExtension extension) |
FeatureFinishCommand |
setNoMerge(boolean noMerge) |
FeatureFinishCommand |
setRebase(boolean rebase)
Set whether to perform a git rebase on the feature before doing the merge
|
FeatureFinishCommand |
setSquash(boolean squash)
Set whether to squash all commits into a single commit before the merge
|
FeatureFinishCommand |
setSuppressFastForward(boolean suppressFastForward) |
checkMergeResults, checkoutTopicBranch, cleanupBranchesIfNeeded, createEmptyMergeResult, doMerge, doMerge, doMerge, doTag, getMessage, isForceDeleteBranch, isKeepBranch, setForceDeleteBranch, setKeepBranch, setMessagedoFetchIfNeeded, doPushIfNeeded, enforcer, ensureLocalBranchesNotBehindRemotes, getBranchName, getScmMessagePrefix, getScmMessageSuffix, isAllowUntracked, isFetch, isPush, runBeforeAndGetPrefixedBranchName, runExtensionCommands, setAllowUntracked, setFetch, setPush, setScmMessagePrefix, setScmMessageSuffixpublic FeatureFinishCommand(String branchName, org.eclipse.jgit.api.Git git, GitFlowConfiguration gfConfig)
JGitFlow.featureFinish(String)git - The git instance to usegfConfig - The GitFlowConfiguration to usepublic org.eclipse.jgit.api.MergeResult call()
throws NotInitializedException,
JGitFlowGitAPIException,
LocalBranchMissingException,
JGitFlowIOException,
DirtyWorkingTreeException,
MergeConflictsNotResolvedException,
BranchOutOfDateException,
JGitFlowExtensionException,
org.eclipse.jgit.api.errors.GitAPIException
NotInitializedExceptionJGitFlowGitAPIExceptionLocalBranchMissingExceptionJGitFlowIOExceptionDirtyWorkingTreeExceptionMergeConflictsNotResolvedExceptionBranchOutOfDateExceptionJGitFlowExtensionExceptionorg.eclipse.jgit.api.errors.GitAPIExceptionpublic FeatureFinishCommand setRebase(boolean rebase)
rebase - true to do a rebase, false(default) otherwisethispublic FeatureFinishCommand setSquash(boolean squash)
squash - true to squash, false(default) otherwisethispublic FeatureFinishCommand setNoMerge(boolean noMerge)
public FeatureFinishCommand setSuppressFastForward(boolean suppressFastForward)
public FeatureFinishCommand setExtension(FeatureFinishExtension extension)
protected String getCommandName()
getCommandName in class AbstractGitFlowCommand<FeatureFinishCommand,org.eclipse.jgit.api.MergeResult>Copyright © 2023 DV Bern AG. All rights reserved.