public class GitHelpers
extends java.lang.Object
Constructor and Description |
---|
GitHelpers() |
Modifier and Type | Method and Description |
---|---|
static void |
checkoutBranch(org.eclipse.jgit.api.Git git,
java.lang.String branch) |
protected static void |
configureBranch(org.eclipse.jgit.api.Git git,
java.lang.String branch,
java.lang.String remote) |
static void |
createOrCheckoutBranch(org.eclipse.jgit.api.Git git,
java.lang.String branch,
java.lang.String remote) |
static java.lang.String |
currentBranch(org.eclipse.jgit.api.Git git) |
static java.io.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,
java.lang.String branch) |
static void |
removeBranch(org.eclipse.jgit.api.Git git,
java.lang.String branch) |
public static java.io.File getRootGitDirectory(org.eclipse.jgit.api.Git git)
public static boolean localBranchExists(org.eclipse.jgit.api.Git git, java.lang.String branch) throws org.eclipse.jgit.api.errors.GitAPIException
org.eclipse.jgit.api.errors.GitAPIException
public static java.lang.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, java.io.IOException
org.eclipse.jgit.api.errors.GitAPIException
java.io.IOException
public static void createOrCheckoutBranch(org.eclipse.jgit.api.Git git, java.lang.String branch, java.lang.String remote) throws org.eclipse.jgit.api.errors.GitAPIException
org.eclipse.jgit.api.errors.GitAPIException
public static void checkoutBranch(org.eclipse.jgit.api.Git git, java.lang.String branch) throws org.eclipse.jgit.api.errors.GitAPIException
org.eclipse.jgit.api.errors.GitAPIException
public static void removeBranch(org.eclipse.jgit.api.Git git, java.lang.String branch) throws org.eclipse.jgit.api.errors.GitAPIException
org.eclipse.jgit.api.errors.GitAPIException
protected static void configureBranch(org.eclipse.jgit.api.Git git, java.lang.String branch, java.lang.String remote)
Copyright © 2016 Red Hat. All Rights Reserved.