GitBranch { 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); }  GitBranchResponse branch(File repositoryPath); GitBranchResponse branch(File repositoryPath, GitBranchOptions options); GitBranchResponse deleteBranch(File repositoryPath, boolean forceDelete, boolean remote, 
      Ref branchName); GitBranchResponse deleteBranch(File repositoryPath, boolean forceDelete, boolean remote, 
      List<Ref> branchList); GitBranchResponse renameBranch(File repositoryPath, boolean forceRename, Ref newName); GitBranchResponse renameBranch(File repositoryPath, boolean forceRename, Ref oldName, 
      Ref newName); GitBranchResponse createBranch(File repositoryPath, Ref branchName); GitBranchResponse createBranch(File repositoryPath, GitBranchOptions options, 
      Ref branchName); GitBranchResponse createBranch(File repositoryPath, Ref branchName, Ref startPoint); GitBranchResponse createBranch(File repositoryPath, GitBranchOptions options, 
      Ref branchName, Ref startPoint);  }
@Test public void testDeleteBranch() throws IOException, JavaGitException { branch.createBranch(repoDirectory, branchA); branch.createBranch(repoDirectory, branchB); branch.deleteBranch(repoDirectory, false, false, branchA); Ref branchC = Ref.createBranchRef("branchC"); Ref branchD = Ref.createBranchRef("branchD"); Ref branchE = Ref.createBranchRef("branchE"); branch.createBranch(repoDirectory, branchC); branch.createBranch(repoDirectory, branchD); branch.createBranch(repoDirectory, branchE); List<Ref> branchList = new ArrayList<Ref>(); branchList.add(branchC); branchList.add(branchD); branch.deleteBranch(repoDirectory, false, false, branchList); }