title: git push fails: RPC failed; result=22, HTTP code = 411
body: <p>I have only one branch. For a few months I have been using</p>
  
  <pre><code>git push origin master
  </code></pre>
  
  <p>to commit to my local repository. Last night after I made some minor changes to my local repository and tried to push using the same command, I got this error:</p>
  
  <pre><code>error: RPC failed; result=22, HTTP code = 411
  fatal: The remote end hung up unexpectedly
  fatal: The remote end hung up unexpectedly
  Everything up-to-date
  </code></pre>
  
  <p>I googled and found questions such as <a href="https://stackoverflow.com/q/999907/1270459">this one</a> and <a href="https://stackoverflow.com/q/2936652/1270459">this one</a>, but none of the answers to these questions solves my problem.</p>
  
  <p>Most of the answers suggest the problem of <strong>detached head</strong>. Yet I don't think my head is detached. Nor do I think I am on the wrong branch (as I only have one branch...)</p>
  
  <p>I did a few experiments to figure out what's wrong, and here are the results I got:</p>
  
  <p>(1) First comes my <code>git status</code> output</p>
  
  <blockquote>
  <pre><code># On branch master
  # Untracked files:
  #   (use "git add &lt;file&gt;..." to include in what will be committed)
  #
  # egal.aux
  # egal.blg
  # egal.out
  # egal.pdf
  # egalcar.aux
  # egalcar.blg
  # egalcar.pdf
  nothing added to commit but untracked files present (use "git add" to track)
  </code></pre>
  </blockquote>
  
  <p>(2) When I type <code>git reflog</code>, I can see all my local commits, but the remote repository just won't get updated.</p>
  
  <p>(3) When I type <code>git branch -a</code>, I get</p>
  
  <blockquote>
  <pre><code>* master
    remotes/origin/master
  </code></pre>
  </blockquote>
  
  <p>(4) When I type <code>git remote show origin</code>, I get</p>
  
  <blockquote>
  <pre><code>* remote origin
    Fetch URL: http://github.com/CherryQu921/egaldoc_en
    Push  URL: http://github.com/CherryQu921/egaldoc_en
    HEAD branch: master
    Remote branch:
      master tracked
    Local ref configured for 'git push':
      master pushes to master (fast-forwardable)
  </code></pre>
  </blockquote>
  
  <p>I think the last line of output (the "fast-forwardable") is weird, but I am not sure what is wrong...</p>