title: Why there are two ways to unstage a file in Git?
body: <p>Sometimes git suggests <code>git rm --cached</code> to unstage a file, sometimes <code>git reset HEAD file</code>. When should I use which?</p>
  
  <p>EDIT:</p>
  
  <pre><code>D:\code\gt2&gt;git init
  Initialized empty Git repository in D:/code/gt2/.git/
  D:\code\gt2&gt;touch a
  
  D:\code\gt2&gt;git status
  # On branch master
  #
  # Initial commit
  #
  # Untracked files:
  #   (use "git add &lt;file&gt;..." to include in what will be committed)
  #
  #       a
  nothing added to commit but untracked files present (use "git add" to track)
  
  D:\code\gt2&gt;git add a
  
  D:\code\gt2&gt;git status
  # On branch master
  #
  # Initial commit
  #
  # Changes to be committed:
  #   (use "git rm --cached &lt;file&gt;..." to unstage)
  #
  #       new file:   a
  #
  D:\code\gt2&gt;git commit -m a
  [master (root-commit) c271e05] a
   0 files changed, 0 insertions(+), 0 deletions(-)
   create mode 100644 a
  
  D:\code\gt2&gt;touch b
  
  D:\code\gt2&gt;git status
  # On branch master
  # Untracked files:
  #   (use "git add &lt;file&gt;..." to include in what will be committed)
  #
  #       b
  nothing added to commit but untracked files present (use "git add" to track)
  
  D:\code\gt2&gt;git add b
  
  D:\code\gt2&gt;git status
  # On branch master
  # Changes to be committed:
  #   (use "git reset HEAD &lt;file&gt;..." to unstage)
  #
  #       new file:   b
  #
  </code></pre>