错误背景

从github克隆仓库后,想推送到gitee,在推送时遇到

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

解决方法

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
09-16 06:01