github clear commits code example
Example 1: git clear commits
git reset --hard origin
Example 2: how to delete old commits in github
git reset --hard HEAD^
git push origin -f
git reset --hard origin
git reset --hard HEAD^
git push origin -f