public GitBranchResponse deleteBranch(File repositoryPath, boolean forceDelete, boolean remote, 
      Ref branchName) throws IOException, JavaGitException {
    CheckUtilities.checkNullArgument(repositoryPath, "repository path");
    CheckUtilities.checkNullArgument(branchName, "branch name");
    CheckUtilities.validateArgumentRefType(branchName, Ref.RefType.BRANCH, "branch name");

    IClient client = ClientManager.getInstance().getPreferredClient();
    IGitBranch gitBranch = client.getGitBranchInstance();
    return gitBranch.deleteBranch(repositoryPath, forceDelete, remote, branchName);
  }
public GitBranchResponse deleteBranch(File repositoryPath, boolean forceDelete, boolean remote, 
      Ref branchName) throws IOException, JavaGitException {
    CheckUtilities.checkNullArgument(repositoryPath, "repository path");
    CheckUtilities.checkNullArgument(branchName, "branch name");
    CheckUtilities.validateArgumentRefType(branchName, Ref.RefType.BRANCH, "branch name");

    IClient client = ClientManager.getInstance().getPreferredClient();
    IGitBranch gitBranch = client.getGitBranchInstance();
    return gitBranch.deleteBranch(repositoryPath, forceDelete, remote, branchName);
  }
public GitBranchResponse deleteBranch ( File repositoryPath , boolean forceDelete , boolean remote , Ref branchName ) throws IOException , JavaGitException { CheckUtilities . checkNullArgument ( repositoryPath , "repository path" ) ; CheckUtilities . checkNullArgument ( branchName , "branch name" ) ; CheckUtilities . validateArgumentRefType ( branchName , Ref . RefType . BRANCH , "branch name" ) ; IClient client = ClientManager . getInstance ( ) . getPreferredClient ( ) ; IGitBranch gitBranch = client . getGitBranchInstance ( ) ; return gitBranch . deleteBranch ( repositoryPath , forceDelete , remote , branchName ) ; }
This method deletes the specified branch using the -d command line option.

@param repositoryPath
A <code>File</code> instance for the path to the repository. If null is passed,
a <code>NullPointerException</code> will be thrown.
@param forceDelete
True if force delete option -D should be used, false if -d should be used.
@param remote
True if delete branch should be acted upon a remote branch.
@param branchName
A branch to be deleted.
@return The result of the git-branch with delete option.
@throws IOException
There are many reasons for which an <code>IOException</code> may be thrown.
Examples include:
<ul>
<li>a directory doesn't exist</li>
<li>access to a file is denied</li>
<li>a command is not found on the PATH</li>
</ul>
@throws JavaGitException
Thrown when there is an error executing git-branch.
This method deletes the specified branch using the - d command line option .