title: Git: How to check whether local branch is ahead of remote branch when working directory is modified?
body: <p>Normally, when the working directory is clean, I can use "git status". The output looks like:</p>
  
  <pre><code># On branch master
  # Your branch is ahead of 'origin/master' by 1 commit.
  #
  nothing to commit (working directory clean)
  </code></pre>
  
  <p>However, if the working directory is modified, "git status" outputs:</p>
  
  <pre><code># On branch master
  # Changes not staged for commit:
  #   (use "git add &lt;file&gt;..." to update what will be committed)
  #   (use "git checkout -- &lt;file&gt;..." to discard changes in working directory)
  #
  #       modified:   body/chap1.tex
  #
  no changes added to commit (use "git add" and/or "git commit -a")
  </code></pre>
  
  <p>The second result doesn't show if I have pushed all changes to remote branches. Sometimes, I still want the first result when the working directory is modified. How to get it in such condition?</p>