git warehouse push error

Error background

After cloning the warehouse from github, I want to push it to gitee, but I encounter the problem when pushing

error: src refspec master does not match any.
error: failed to push some refs to '<REMOTE_URL>'

Solution

rm -rf .github
git init
git add -A
git commit -m "init for gitee"
git remote remove origin
git remote add origin 你的gitee仓库地址
git push -u origin main

Guess you like

Origin blog.csdn.net/fly1574/article/details/132894678