最近新建的Github项目在提交过程中报错:
git push origin master error: src refspec master does not match any error: failed to push some refs to ‘https://github.com/username/repository_name’
我反复测试了多种可能的错因,最终想到了Github为了某些目的将master改为main,而原先的master予以保留,所以提交之前的项目代码都不会错,这一次就会错。
故现在的正解为:
git push origin main