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 |
setAllowRemote(boolean allow) |
JGitFlowInitCommand |
setAlwaysUpdateOrigin(boolean update) |
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
|
JGitFlowInitCommand |
setPullDevelop(boolean pull) |
JGitFlowInitCommand |
setPullMaster(boolean pull) |
public JGitFlowInitCommand()
JGitFlow
init methodspublic JGitFlow call() throws JGitFlowIOException, JGitFlowGitAPIException, AlreadyInitializedException, SameBranchException
call
in interface Callable<JGitFlow>
JGitFlow
instanceJGitFlowIOException
JGitFlowGitAPIException
AlreadyInitializedException
SameBranchException
public JGitFlowInitCommand setDirectory(File directory)
directory
- this
public JGitFlowInitCommand setInitContext(InitContext context)
context
- this
public JGitFlowInitCommand setForce(boolean force)
force
- true
to override, false
(default) otherwisethis
public JGitFlowInitCommand setDefaultOriginUrl(String defaultOriginUrl)
public JGitFlowInitCommand setAlwaysUpdateOrigin(boolean update)
public JGitFlowInitCommand setPullMaster(boolean pull)
public JGitFlowInitCommand setPullDevelop(boolean pull)
public JGitFlowInitCommand setAllowRemote(boolean allow)
Copyright © 2017 Atlassian. All rights reserved.