public class JGitFlowInitCommand extends Object implements Callable<JGitFlow>
JGitFlow flow = JGitFlow.init(new File("some dir"));
Initialize with the defaults or return the instance if it's already initialized
JGitFlow flow = JGitFlow.getOrInit(new File("some dir"));
Initialize with custom overrides or return the instance if it's already initialized
InitContext ctx = new InitContext();
ctx.setMaster("GA");
JGitFlow flow = JGitFlow.getOrInit(new File("some dir"), ctx);
Initialize with custom overrides replacing any existing configuration
InitContext ctx = new InitContext();
ctx.setMaster("GA");
JGitFlow flow = JGitFlow.forceInit(new File("some dir"), ctx);
| Constructor and Description |
|---|
JGitFlowInitCommand()
Create a new init command instance.
|
| Modifier and Type | Method and Description |
|---|---|
JGitFlow |
call() |
JGitFlowInitCommand |
setDefaultOriginUrl(String defaultOriginUrl) |
JGitFlowInitCommand |
setDirectory(File directory)
Sets the project root folder
|
JGitFlowInitCommand |
setForce(boolean force)
Whether to override the current configuration
|
JGitFlowInitCommand |
setInitContext(InitContext context)
Set the initialization context
|
public JGitFlowInitCommand()
JGitFlow init methodspublic JGitFlow call() throws JGitFlowIOException, JGitFlowGitAPIException, AlreadyInitializedException, SameBranchException
call in interface Callable<JGitFlow>JGitFlow instanceJGitFlowIOExceptionJGitFlowGitAPIExceptionAlreadyInitializedExceptionSameBranchExceptionpublic JGitFlowInitCommand setDirectory(File directory)
directory - thispublic JGitFlowInitCommand setInitContext(InitContext context)
context - thispublic JGitFlowInitCommand setForce(boolean force)
force - true to override, false(default) otherwisethispublic JGitFlowInitCommand setDefaultOriginUrl(String defaultOriginUrl)
Copyright © 2013 Atlassian. All Rights Reserved.