Question: What is the difference between a soft reset (`git reset --soft`) and a hard reset (`git reset ?hard`) ?

  1. A soft reset only changes the commit that HEAD points to, while a hard reset resets the index and working tree to match the specified commit, discarding any changes.
  2. A soft reset caches the old HEAD pointer, while a hard reset deletes it entirely.
  3. A hard reset changes only where the HEAD is pointing, while a soft reset changes the HEAD and index.
  4. A hard reset caches the old HEAD pointer, while a soft reset deletes it entirely.

Answer: The correct answer of the above question is Option A:A soft reset only changes the commit that HEAD points to, while a hard reset resets the index and working tree to match the specified commit, discarding any changes.