title: Github API: Retrieve all commits for all branches for a repo
body: <p>According to the V2 documentation, you can list all commits for a branch with:</p>
  
  <pre><code>commits/list/:user_id/:repository/:branch
  </code></pre>
  
  <p>I am not seeing the same functionality in the V3 documentation.</p>
  
  <p>I would like to collect all branches using something like:</p>
  
  <pre><code>https://api.github.com/repos/:user/:repo/branches
  </code></pre>
  
  <p>And then iterate through them, pulling all commits for each. Alternatively, if there's a way to pull all commits for all branches for a repo directly, that would work just as well if not better. Any ideas? </p>
  
  <p>UPDATE: I tried passing the branch :sha as a param as follows:</p>
  
  <pre><code>params = {:page =&gt; 1, :per_page =&gt; 100, :sha =&gt; b}
  </code></pre>
  
  <p>The problem is that when i do this, it doesn't page the results properly. I feel like we're approaching this incorrectly. Any thoughts?</p>