public class FeatureFinishCommand extends AbstractGitFlowCommand<Void>
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| Constructor and Description |
|---|
FeatureFinishCommand(String name,
org.eclipse.jgit.api.Git git,
GitFlowConfiguration gfConfig,
JGitFlowReporter reporter)
Create a new feature finish command instance.
|
| Modifier and Type | Method and Description |
|---|---|
Void |
call() |
protected String |
getCommandName() |
FeatureFinishCommand |
setAllowUntracked(boolean allow) |
FeatureFinishCommand |
setFetchDevelop(boolean fetch)
Set whether to perform a git fetch of the remote develop branch before doing the merge
|
FeatureFinishCommand |
setForceDeleteBranch(boolean force)
Set whether to use the force flag when deleting the local feature branch
|
FeatureFinishCommand |
setKeepBranch(boolean keep)
Set whether to keep the local feature branch after the merge
|
FeatureFinishCommand |
setNoMerge(boolean noMerge) |
FeatureFinishCommand |
setPush(boolean push) |
FeatureFinishCommand |
setRebase(boolean rebase)
Set whether to perform a git rebase on the feature before doing the merge
|
FeatureFinishCommand |
setScmMessagePrefix(String scmMessagePrefix) |
FeatureFinishCommand |
setSquash(boolean squash)
Set whether to squash all commits into a single commit before the merge
|
getScmMessagePrefix, isAllowUntracked, requireCleanWorkingTree, requireCommitOnBranch, requireGitFlowInitialized, requireLocalBranchAbsent, requireLocalBranchExists, requireLocalBranchNotBehindRemote, requireNoExistingHotfixBranches, requireNoExistingReleaseBranches, requireRemoteBranchAbsent, requireRemoteBranchExists, requireTagAbsentpublic FeatureFinishCommand(String name, org.eclipse.jgit.api.Git git, GitFlowConfiguration gfConfig, JGitFlowReporter reporter)
JGitFlow.featureFinish(String)name - The name of the featuregit - The git instance to usegfConfig - The GitFlowConfiguration to usereporter - public FeatureFinishCommand setAllowUntracked(boolean allow)
setAllowUntracked in class AbstractGitFlowCommand<Void>public FeatureFinishCommand setScmMessagePrefix(String scmMessagePrefix)
setScmMessagePrefix in class AbstractGitFlowCommand<Void>public Void call() throws NotInitializedException, JGitFlowGitAPIException, LocalBranchMissingException, JGitFlowIOException, DirtyWorkingTreeException, MergeConflictsNotResolvedException, BranchOutOfDateException
public FeatureFinishCommand setFetchDevelop(boolean fetch)
fetch - true to do the fetch, false(default) otherwisethispublic FeatureFinishCommand setRebase(boolean rebase)
rebase - true to do a rebase, false(default) otherwisethispublic FeatureFinishCommand setKeepBranch(boolean keep)
keep - true to keep the branch, false(default) otherwisethispublic FeatureFinishCommand setForceDeleteBranch(boolean force)
force - true to force, false(default) otherwisethispublic FeatureFinishCommand setSquash(boolean squash)
squash - true to squash, false(default) otherwisethispublic FeatureFinishCommand setPush(boolean push)
public FeatureFinishCommand setNoMerge(boolean noMerge)
protected String getCommandName()
getCommandName in class AbstractGitFlowCommand<Void>Copyright © 2013 Atlassian. All Rights Reserved.