code: public Ref getCurrentBranch() throws IOException, JavaGitException {
      GitBranch gitBranch = new GitBranch();
      GitBranchOptions options = new GitBranchOptions();
      GitBranchResponse response = gitBranch.branch(path, options);
      return response.getCurrentBranch();
    }
docs: Gets the currently checked-out branch of the working directory.
  
  @return The currently checked-out branch of the working directory.