git reset --hard 71c27777543ccfcb0376dcdd8f6777df055ef479
git push --force
git clone 'VerybadRepo.git'
cd VeryBadRepo.git
git log
(find and copy "commit id" )
git rebase -i "commit id"
remove line with unwanted commits ; save and close editor
git push -f origin master/main
git reset -- MAIN^
git reset -- MAIN^2 (reset last 2 commits)
(increase number for number of commits you want
to delete from your local repo, before youve pushed)