Check the commit number and copy it that you want to be back at.
git log --oneline --all --graph
Delete local commits
git reset --hard <commit#>
Delete remote commits
git push --force origin master
Check the commit number and copy it that you want to be back at.
git log --oneline --all --graph
Delete local commits
git reset --hard <commit#>
Delete remote commits
git push --force origin master