error: failed to push some refs when adding local repo to online repo code example
Example 1: error: failed to push some refs to
git pull --rebase origin main
git push origin main
Example 2: failed to push some refs
git push origin master
git pull --rebase origin main
git push origin main
git push origin master