delete commit from local repo code example
Example 1: git delete local commit
git reset --hard origin/<branch_name>
Example 2: remove the commit from local
git reset --soft HEAD~1
git reset --hard origin/<branch_name>
git reset --soft HEAD~1