To make the main branch exactly like the dev branch by ignoring the changes in the main branch and overwriting it with dev:
git fetch originCheck out to the main branch:
git checkout mainReset the main branch to match the dev branch:
git reset --hard origin/devForce push the changes to the remote main branch:
git push origin main --force