title: How can I find out how many commits in master are not in my branch?
body: <p>We are using GitHub to store our code repositories, and we would like all developers to ensure that branches are up to date with master before doing local developer testing, and merging. </p>
  
  <p>There are two ways of updating a branch with the commits of master:</p>
  
  <ol>
  <li>Merge <code>master</code> into my branch <code>feature_branch</code>, and push <code>feature_branch</code></li>
  <li>Rebase my branch <code>feature_branch</code> onto master, and force push <code>feature_branch</code>.</li>
  </ol>
  
  <p>Given that the team in question is currently using 1. (merge workflow), how can I see:</p>
  
  <ol>
  <li>The <strong>number of commits</strong> that are in the remote <code>master</code> branch, but not in the remote <code>feature_branch</code>.</li>
  <li>A true value if the number in 1 is >0, otherwise false. </li>
  </ol>
  
  <p>It would be most preferable to have something that integrates with GitHub do this, but I'd like to know how to do this from the command line as well. </p>
  
  <p>I know that I can do a <code>git diff master..feature_branch</code>, but that actually gives me all the changes (and is for the local branches). I just want to know the number of commits ahead and behind, in the same manner than it is shown between local <code>master</code> and remote <code>master</code></p>