What is the difference between git reset –soft, –mixed, and –hard?

Git Medium

Git — Medium

What is the difference between git reset –soft, –mixed, and –hard?

Key points

  • --soft keeps changes in staging and working directory
  • --mixed resets staging but preserves working directory
  • --hard has the most destructive effect, discarding all changes
  • Each option moves the HEAD pointer differently

Ready to go further?

Related questions