title: GO-Github API: How To Commit and Push to a remote branch
body: <p>I'm trying to use <a href="https://github.com/google/go-github" rel="nofollow noreferrer">Go-Github</a> to create a text file and push it into a remote branch but I'm totally confused on how to do it.</p>
  <p>I'm able to get a listing of repositories with my client org</p>
  <pre><code>repos, _, err := client.Repositories.ListByOrg(&quot;MyOrg&quot;, nil)
  </code></pre>
  <p>I'm able to use that and get a remote branch</p>
  <pre><code>branch, resp, err := client.Repositories.GetBranch(&quot;MyOrg&quot;, &quot;MyRepository&quot;, &quot;MyBranch&quot;)
  </code></pre>
  <p>but for the life of me I'm unable to figure out how to commit a file (or files) in my local branch and push the commit to the remote branch.</p>
  <p>Thanks for any help that anyone can give.</p>