javagit/src/main/java/edu/nyu/cs/javagit/api/DotGit.java
public Iterator<Ref> getBranches() throws IOException, JavaGitException {
    GitBranch gitBranch = new GitBranch();
    GitBranchOptions options = new GitBranchOptions();
    GitBranchResponse response = gitBranch.branch(path, options);
    return response.getBranchListIterator();
  }
public Iterator<Ref> getBranches() throws IOException, JavaGitException {
    GitBranch gitBranch = new GitBranch();
    GitBranchOptions options = new GitBranchOptions();
    GitBranchResponse response = gitBranch.branch(path, options);
    return response.getBranchListIterator();
  }
Gets a list of the branches in the repository.

@return The branches in the repository.