run this command git reset --soft HEAD~
git checkout --orphan latest_branch git add -A git commit -am "commit message" git branch -D main git branch -m main git push -f origin main