how to get rid of commits in git code example
Example 1: get unpushed commits
git log origin/master..HEAD
Example 2: git delete local commit
git reset --hard origin/<branch_name>
Example 3: git clear commits
git reset --hard origin
Example 4: how to delete old commits in github
git reset --hard HEAD^
git push origin -f
Example 5: delete commit
git checkout master
git reset --hard e3f1e37
git push --force origin master
# Then to prove it (it won't print any diff)
git diff master..origin/master