how to remove all commits from git 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