how to remove git commit in local code example
Example 1: git revert last commit unpushed
git reset --soft HEAD~1
Example 2: revert unpublished commits
git reset --hard <hash-or-ref>
git reset --soft HEAD~1
git reset --hard <hash-or-ref>