public class GitHelpers extends Object
| Constructor and Description |
|---|
GitHelpers() |
| Modifier and Type | Method and Description |
|---|---|
static void |
checkoutBranch(org.eclipse.jgit.api.Git git,
String branch) |
protected static void |
configureBranch(org.eclipse.jgit.api.Git git,
String branch,
String remote) |
static void |
createOrCheckoutBranch(org.eclipse.jgit.api.Git git,
String branch,
String remote) |
static String |
currentBranch(org.eclipse.jgit.api.Git git) |
static File |
getRootGitDirectory(org.eclipse.jgit.api.Git git)
Returns the root directory of the git repo which contains the ".git" directory
|
static boolean |
hasGitHead(org.eclipse.jgit.api.Git git) |
static boolean |
localBranchExists(org.eclipse.jgit.api.Git git,
String branch) |
static void |
removeBranch(org.eclipse.jgit.api.Git git,
String branch) |
public static File getRootGitDirectory(org.eclipse.jgit.api.Git git)
public static boolean localBranchExists(org.eclipse.jgit.api.Git git,
String branch)
throws org.eclipse.jgit.api.errors.GitAPIException
org.eclipse.jgit.api.errors.GitAPIExceptionpublic static String currentBranch(org.eclipse.jgit.api.Git git)
public static boolean hasGitHead(org.eclipse.jgit.api.Git git)
throws org.eclipse.jgit.api.errors.GitAPIException,
IOException
org.eclipse.jgit.api.errors.GitAPIExceptionIOExceptionpublic static void createOrCheckoutBranch(org.eclipse.jgit.api.Git git,
String branch,
String remote)
throws org.eclipse.jgit.api.errors.GitAPIException
org.eclipse.jgit.api.errors.GitAPIExceptionpublic static void checkoutBranch(org.eclipse.jgit.api.Git git,
String branch)
throws org.eclipse.jgit.api.errors.GitAPIException
org.eclipse.jgit.api.errors.GitAPIExceptionpublic static void removeBranch(org.eclipse.jgit.api.Git git,
String branch)
throws org.eclipse.jgit.api.errors.GitAPIException
org.eclipse.jgit.api.errors.GitAPIExceptionCopyright © 2011–2014 Red Hat. All rights reserved.