public class GitHelpers extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
gitignore |
static Map<String,org.eclipse.jgit.lib.Repository> |
typeRepo |
static Map<String,String> |
typeToRepo |
| Constructor and Description |
|---|
GitHelpers() |
| Modifier and Type | Method and Description |
|---|---|
static org.eclipse.jgit.revwalk.RevCommit |
commitChanges(String type,
String commitMessage) |
static org.eclipse.jgit.revwalk.RevCommit |
commitDelete(String type,
String deletePath,
String commitMessage) |
static void |
createDirIfNotExists(String dir) |
static void |
ensureGitRepo(String type,
String REPOS_BASE_DIR) |
static Set<String> |
getChanges(String type) |
static org.eclipse.jgit.lib.Repository |
getLocalRepo(String type) |
static org.eclipse.jgit.api.PullResult |
pull(String type,
String REPOS_BASE_DIR) |
static Iterable<org.eclipse.jgit.transport.PushResult> |
push(String type,
String REMOTE_BASE_URL,
String user,
String pass,
String REPOS_BASE_DIR) |
static Iterable<org.eclipse.jgit.transport.PushResult> |
push(String type,
String REMOTE_BASE_URL,
org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider prov,
String REPOS_BASE_DIR) |
public static final String gitignore
public static void createDirIfNotExists(String dir)
public static org.eclipse.jgit.revwalk.RevCommit commitChanges(String type, String commitMessage)
public static org.eclipse.jgit.revwalk.RevCommit commitDelete(String type, String deletePath, String commitMessage)
public static org.eclipse.jgit.lib.Repository getLocalRepo(String type)
public static org.eclipse.jgit.api.PullResult pull(String type, String REPOS_BASE_DIR) throws org.eclipse.jgit.api.errors.WrongRepositoryStateException, org.eclipse.jgit.api.errors.InvalidConfigurationException, org.eclipse.jgit.api.errors.InvalidRemoteException, org.eclipse.jgit.api.errors.CanceledException, org.eclipse.jgit.api.errors.RefNotFoundException, org.eclipse.jgit.api.errors.RefNotAdvertisedException, org.eclipse.jgit.api.errors.NoHeadException, org.eclipse.jgit.api.errors.TransportException, org.eclipse.jgit.api.errors.GitAPIException
org.eclipse.jgit.api.errors.WrongRepositoryStateExceptionorg.eclipse.jgit.api.errors.InvalidConfigurationExceptionorg.eclipse.jgit.api.errors.InvalidRemoteExceptionorg.eclipse.jgit.api.errors.CanceledExceptionorg.eclipse.jgit.api.errors.RefNotFoundExceptionorg.eclipse.jgit.api.errors.RefNotAdvertisedExceptionorg.eclipse.jgit.api.errors.NoHeadExceptionorg.eclipse.jgit.api.errors.TransportExceptionorg.eclipse.jgit.api.errors.GitAPIExceptionpublic static Iterable<org.eclipse.jgit.transport.PushResult> push(String type, String REMOTE_BASE_URL, org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider prov, String REPOS_BASE_DIR) throws org.eclipse.jgit.api.errors.InvalidRemoteException, org.eclipse.jgit.api.errors.TransportException, org.eclipse.jgit.api.errors.GitAPIException
org.eclipse.jgit.api.errors.InvalidRemoteExceptionorg.eclipse.jgit.api.errors.TransportExceptionorg.eclipse.jgit.api.errors.GitAPIExceptionpublic static Iterable<org.eclipse.jgit.transport.PushResult> push(String type, String REMOTE_BASE_URL, String user, String pass, String REPOS_BASE_DIR) throws org.eclipse.jgit.api.errors.InvalidRemoteException, org.eclipse.jgit.api.errors.TransportException, org.eclipse.jgit.api.errors.GitAPIException
org.eclipse.jgit.api.errors.InvalidRemoteExceptionorg.eclipse.jgit.api.errors.TransportExceptionorg.eclipse.jgit.api.errors.GitAPIExceptionCopyright © 2019. All rights reserved.