how to revert local commit on command line code example
Example 1: revert local commit git bash
git reset --soft HEAD~1
Example 2: revert local commit
$ git reset --hard HEAD~1
git reset --soft HEAD~1
$ git reset --hard HEAD~1