title: why does it say "Your branch is ahead of origin/master by 857 commits" when I need to *pull* origin master
body: <p>Firstly, I'm aware of a number of similarly worded questions, eg:  </p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/277077/why-is-git-telling-me-your-branch-is-ahead-of-origin-master-by-11-commits-a">How can I find the location of origin/master in git, and how do I change it?</a></li>
  <li><a href="https://stackoverflow.com/questions/2432579/git-your-branch-is-ahead-by-x-commits">git: Your branch is Ahead by X commits</a></li>
  <li><a href="https://stackoverflow.com/questions/10966498/git-branch-is-ahead-by-x-commits-doesnt-help-doing-git-pull">Git: Branch is ahead by X commits. Doesn&#39;t help doing git pull</a></li>
  <li><a href="https://stackoverflow.com/questions/7365415/pull-only-repos-git-status-saying-the-branch-is-ahead-of-origin-master-why">pull-only repo&#39;s &#39;git status&#39; saying the branch is ahead of origin/master. Why?</a></li>
  </ul>
  
  <p>None of them (AFAICT) has an answer that matches my version of this question.</p>
  
  <p>My situation is:</p>
  
  <pre><code>$ git status
  # On branch stable
  nothing to commit (working directory clean)
  $ git checkout master
  Switched to branch 'master'
  Your branch is ahead of 'origin/master' by 857 commits.
  </code></pre>
  
  <p>In the existing questions the accepted and upvoted answers mostly concur that it means literally what it says... I'm ahead and I need to <em>push</em> my new commits to origin/master.</p>
  
  <p>I know that actually the opposite situation is true, that my local <code>master</code> branch is behind the remote <code>origin/master</code> and actually I need to <code>git pull origin master</code> before doing some work on it locally. (or possibly just <code>git fetch origin</code> ?)</p>
  
  <p>My question is... is there some reason for the message to be worded <code>Your branch is ahead of 'origin/master' by 857 commits.</code> such that it literally makes sense?</p>
  
  <p>Because the way I understand it at the moment the meaning is the opposite of what the message says ('my branch' is <em>behind</em> origin/master).</p>
  
  <p>Or does it really mean: "The HEAD of the remote master branch is ahead of your local origin/master tracking branch" ?</p>
  
  <p><strong>update</strong>
  FWIW I am working in a team of half a dozen other developers. We all pull, commit and push etc many times a day without problem. I don't have a bug here... I'm just trying to understand why Git words its message this way - whether the wording itself is badly chosen, or if there's some underlying concept of Git that causes them to word it this way and which I'm not understanding properly.</p>
  
  <p><strong>more info</strong><br>
  here is what I guess may be the relevant part of output from <code>git config -l</code></p>
  
  <pre><code>remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
  remote.origin.url=https://code.google.com/a/google.com/p/xxxxx/
  branch.master.remote=origin
  branch.master.merge=refs/heads/master
  branch.master.mergeoptions=--no-ff
  </code></pre>