git reset latest commit code example
Example 1: roll back last commit in git
git reset --soft HEAD~1
Example 2: reset last commit
$ git reset --soft HEAD~1
Example 3: undo reset commit git
git reflog //to get commitID
git reset #commitID
Example 4: git reset initial commit
git update-ref -d HEAD