javagit/src/main/java/edu/nyu/cs/javagit/api/commands/GitBranch.java
public GitBranchResponse deleteBranch(File repositoryPath, boolean forceDelete, boolean remote, 
      List<Ref> branchList) throws IOException, JavaGitException {
    CheckUtilities.checkNullArgument(repositoryPath, "repository path");
    CheckUtilities.checkNullListArgument(branchList, "branch list");
    CheckUtilities.validateListRefType(branchList, Ref.RefType.BRANCH, "branch list");

    IClient client = ClientManager.getInstance().getPreferredClient();
    IGitBranch gitBranch = client.getGitBranchInstance();
    return gitBranch.deleteBranches(repositoryPath, forceDelete, remote, branchList);
  }
public GitBranchResponse deleteBranch(File repositoryPath, boolean forceDelete, boolean remote, 
      List<Ref> branchList) throws IOException, JavaGitException {
    CheckUtilities.checkNullArgument(repositoryPath, "repository path");
    CheckUtilities.checkNullListArgument(branchList, "branch list");
    CheckUtilities.validateListRefType(branchList, Ref.RefType.BRANCH, "branch list");

    IClient client = ClientManager.getInstance().getPreferredClient();
    IGitBranch gitBranch = client.getGitBranchInstance();
    return gitBranch.deleteBranches(repositoryPath, forceDelete, remote, branchList);
  }
Deletes the specified branches 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 list.
@param branchList
The list of branches to be deleted.
@return The result of the git-branch with -d 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.