Constructor and Description |
---|
InitCommand() |
Modifier and Type | Method and Description |
---|---|
Git |
call()
Executes the
Init command. |
InitCommand |
setBare(boolean bare) |
InitCommand |
setDirectory(File directory)
The optional directory associated with the init operation.
|
InitCommand |
setGitDir(File gitDir) |
public Git call() throws GitAPIException
Init
command.call
in interface Callable<Git>
Git
object with associated repositoryGitAPIException
public InitCommand setDirectory(File directory) throws IllegalStateException
directory
- the directory to init toIllegalStateException
- if the combination of directory, gitDir and bare is illegal.
E.g. if for a non-bare repository directory and gitDir point
to the same directory of if for a bare repository both
directory and gitDir are specifiedpublic InitCommand setGitDir(File gitDir) throws IllegalStateException
gitDir
- the repository meta directoryIllegalStateException
- if the combination of directory, gitDir and bare is illegal.
E.g. if for a non-bare repository directory and gitDir point
to the same directory of if for a bare repository both
directory and gitDir are specifiedpublic InitCommand setBare(boolean bare)
bare
- whether the repository is bare or notIllegalStateException
- if the combination of directory, gitDir and bare is illegal.
E.g. if for a non-bare repository directory and gitDir point
to the same directory of if for a bare repository both
directory and gitDir are specifiedCopyright © 2016 Eclipse JGit Project. All rights reserved.