What is the difference between git reset soft, mixed and hard? When doing reset in git, you can add --soft, --mixed or --hard switch, or leave it, --mixed is the default. What do this switches do?
- Code before changes
- Code after changes
- Changes staged on index
- Changes commited
Now if you issue
git reset --xxxx HEAD~1
--soft moves you back to (3), --mixed to (2) and --hard to (1)
Written with StackEdit.