title: How can I get last commit from GitHub API
body: <p>Which is the best way to get the latest commit information from a git repository using GitHub API (Rest API v3).</p>
  
  <p>Option 1: <code>GET /repos/:owner/:repo/commits/master</code><br>
  Can I assume that the object 'commit' of the response is the latest commit from branch master?</p>
  
  <p>Option 2: <code>GET /repos/:owner/:repo/git/commits/5a2ff</code><br>
  Or make two calls, one to get the sha by getting the HEAD ref from master and then get the commit information using the sha returned.</p>