javagit/src/main/java/edu/nyu/cs/javagit/api/DotGit.java
public void deleteBranch(Ref branch, boolean forceDelete) 
    throws IOException, JavaGitException {
    GitBranch gitBranch = new GitBranch();
    gitBranch.deleteBranch(path, forceDelete, false, branch);
    branch = null;
  }
public void deleteBranch(Ref branch, boolean forceDelete) 
    throws IOException, JavaGitException {
    GitBranch gitBranch = new GitBranch();
    gitBranch.deleteBranch(path, forceDelete, false, branch);
    branch = null;
  }
public void deleteBranch ( Ref branch , boolean forceDelete ) throws IOException , JavaGitException { GitBranch gitBranch = new GitBranch ( ) ; gitBranch . deleteBranch ( path , forceDelete , false , branch ) ; branch = null ; }
Deletes a branch

@param branch
The branch to delete
@param forceDelete
True if force delete option -D should be used,
false if -d should be used.
@throws IOException
Thrown in case of I/O operation failure
@throws JavaGitException
Thrown when there is an error executing git-branch.
Deletes a branch