main and master are entirely commit histories. image.png 如何解决呢?

# 切换分支至master
git checkout master
# 强制重命名master分支为main分支
git branch main master -f
# 切换分支至main
git checkout main
# 强制推送本地main分支至远程库,并覆盖远程main分支内容
git push origin main -f