title: What's the difference between git reset --hard and git reset --merge
body: <p>In my experiments I haven't been able to find any functional difference between</p>
  
  <pre><code>git reset --hard
  </code></pre>
  
  <p>and</p>
  
  <pre><code>git reset --merge
  </code></pre>
  
  <p>The usage instructions don't give any hint either</p>
  
  <pre><code>--hard                reset HEAD, index and working tree
  --merge               reset HEAD, index and working tree
  </code></pre>
  
  <p>I regularly use the <code>--hard</code> option so understand how that works. What's the difference between the <code>--merge</code> and the <code>--hard</code> options?</p>
  
  <p>Cheers,
  Olly</p>
  
  <p>Perhaps an example would help here, let's use the following sequence:</p>
  
  <pre><code>cd git_repo
  touch file_one
  git add file_one
  git commit -m "commit one" # sha1 of 123abc
  echo "one" &gt;&gt; ./file_one
  git commit -a -m "commit two" # sha1 of 234bcd
  echo "two" &gt;&gt; ./file_one
  git add . # populate index with a change
  echo "three" &gt;&gt; ./file_one # populate working area with a change
  </code></pre>
  
  <p>Now if I try</p>
  
  <pre><code>git reset --merge 123abc
  </code></pre>
  
  <p>I get</p>
  
  <pre><code>error: Entry 'file_one' not uptodate. Cannot merge.
  fatal: Could not reset index file to revision '123abc'
  </code></pre>
  
  <p>the reason being that file_one has changes in both the working area and the index</p>
  
  <p>To remedy this I do</p>
  
  <pre><code>git add .
  git reset --merge 123abc
  </code></pre>
  
  <p>This time it works, however, I get the same result as <code>git reset --hard</code>. The index is empty, working area is empty, file_one is empty, as it was after first commit.</p>
  
  <p>Can someone come up with the steps that illustrate the difference?</p>