Git Javascript AJAX jQuery HTML PHP Example MORE

How to GIT commit reset command


It will revert the commit but keep the changes

git reset --soft HEAD~1

Create new branch

git reset HEAD index.js

It unstage a staged file.

git reset --hard HEAD~1

It will revert the commit and remove the changes