public class GitRepository extends Object implements Closeable
| Constructor and Description |
|---|
GitRepository(GitRepositoryConfiguration gitConfig) |
GitRepository(org.eclipse.jgit.lib.Repository repository) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
commit(String msg)
Commit all changes if there are uncommitted changes.
|
String |
getBranch() |
File |
getDirectory() |
org.eclipse.jgit.api.Git |
getGit() |
String |
getPattern(File file) |
String |
getPattern(Path file) |
String |
getRemoteName(String gitRepository) |
boolean |
isBare() |
boolean |
isValidRemoteName(String remoteName) |
void |
rollback()
Reset hard on HEAD.
|
public GitRepository(GitRepositoryConfiguration gitConfig) throws IllegalArgumentException, IOException, org.wildfly.client.config.ConfigXMLParseException, GeneralSecurityException
IllegalArgumentExceptionIOExceptionorg.wildfly.client.config.ConfigXMLParseExceptionGeneralSecurityExceptionpublic GitRepository(org.eclipse.jgit.lib.Repository repository)
public org.eclipse.jgit.api.Git getGit()
public File getDirectory()
public boolean isBare()
public void close()
close in interface Closeableclose in interface AutoCloseablepublic String getBranch()
public final boolean isValidRemoteName(String remoteName)
public void rollback()
throws org.eclipse.jgit.api.errors.GitAPIException
org.eclipse.jgit.api.errors.GitAPIExceptionpublic void commit(String msg) throws org.eclipse.jgit.api.errors.GitAPIException
msg - the commit message.org.eclipse.jgit.api.errors.GitAPIExceptionCopyright © 2019 JBoss by Red Hat. All rights reserved.