code: func pushCommit(ref *github.Reference, tree *github.Tree) (err error) {
  	// Get the parent commit to attach the commit to.
  	parent, _, err := client.Repositories.GetCommit(ctx, *sourceOwner, *sourceRepo, *ref.Object.SHA)
  	if err != nil {
  		return err
  	}
  	// This is not always populated, but is needed.
  	parent.Commit.SHA = parent.SHA
  
  	// Create the commit using the tree.
  	date := time.Now()
  	author := &github.CommitAuthor{Date: &date, Name: authorName, Email: authorEmail}
  	commit := &github.Commit{Author: author, Message: commitMessage, Tree: tree, Parents: []github.Commit{*parent.Commit}}
  	newCommit, _, err := client.Git.CreateCommit(ctx, *sourceOwner, *sourceRepo, commit)
  	if err != nil {
  		return err
  	}
  
  	// Attach the commit to the master branch.
  	ref.Object.SHA = newCommit.SHA
  	_, _, err = client.Git.UpdateRef(ctx, *sourceOwner, *sourceRepo, ref, false)
  	return err
  }
docs: // createCommit creates the commit in the given reference using the given tree.