code: public Iterator<Ref> getBranches() throws IOException, JavaGitException {
      GitBranch gitBranch = new GitBranch();
      GitBranchOptions options = new GitBranchOptions();
      GitBranchResponse response = gitBranch.branch(path, options);
      return response.getBranchListIterator();
    }
docs: Gets a list of the branches in the repository.
  
  @return The branches in the repository.