how to revert local commit in git bash code example
Example 1: git undo last commit
$ git reset --soft HEAD~1
Example 2: revert local commit
$ git reset --hard HEAD~1
Example 3: revert git commit
git revert <the_commit_hash>
$ git reset --soft HEAD~1
$ git reset --hard HEAD~1
git revert <the_commit_hash>