title: Refresh staged files
body: <p>In git, is there any (simple) way to modify the index so that only changes to files which are already in it are added? It sounds kind of complicated, but what I want to achieve is simple.</p>
  
  <p>Lets say my index looks like this (slightly stripped <code>git status</code> output):</p>
  
  <pre><code># Changes to be committed:
  #       modified:   A
  #       modified:   B
  #
  # Changed but not updated:
  #       modified:   B
  #       modified:   C
  #
  # Untracked files:
  #       D
  </code></pre>
  
  <p>Some changes to <code>B</code> are in the index, some aren't.
  <code>C</code> is not staged at all.</p>
  
  <p>How can I update <code>B</code> in the index (stage its unstaged changes) without adding <code>C</code>?</p>
  
  <p>I.e. I would like for the index to look like this:</p>
  
  <pre><code># Changes to be committed:
  #       modified:   A
  #       modified:   B
  #
  # Changed but not updated:
  #       modified:   C
  #
  # Untracked files:
  #       D
  </code></pre>
  
  <p>In this simple case it can of course be achieved with a simple <code>git add B</code>, but I would like to know if there's a simple answer for the general case. I tried <code>git add --refresh</code>, but if I understand correctly, that only updates stat info.</p>