code: public Branch createBranch(Object projectIdOrPath, String branchName, String ref) throws GitLabApiException {
  
          Form formData = new GitLabApiForm()
                  .withParam(isApiVersion(ApiVersion.V3) ? "branch_name" : "branch", branchName, true)
                  .withParam("ref", ref, true);
          Response response = post(Response.Status.CREATED, formData.asMap(), "projects",
                  getProjectIdOrPath(projectIdOrPath), "repository", "branches");
          return (response.readEntity(Branch.class));
      }
docs: Creates a branch for the project. Support as of version 6.8.x
  
  <pre><code>GitLab Endpoint: POST /projects/:id/repository/branches</code></pre>
  
  @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
  @param branchName the name of the branch to create
  @param ref Source to create the branch from, can be an existing branch, tag or commit SHA
  @return the branch info for the created branch
  @throws GitLabApiException if any exception occurs