将intellij项目添加到gitlab时出错



执行以下操作:

  • git init
  • git添加
  • git commit-m";消息">
  • git远程添加原点https://gitlab.com/xxxxxx/tmp.git'
  • git push-u原始主机

我收到以下错误

错误:src refspec master与任何都不匹配

错误:无法将某些引用推送到"https://gitlab.com/xxxxxx/tmp.git'

在GitHub上创建的远程存储库很可能为主分支main分支(请参阅GitLab文档(

  • 要么你把你的本地主机推到主:

    git push -u origin master:main
    
  • 或者(最好(将您的本地分支机构重命名为主要

    git branch -m master main
    git push -u origin main
    

最新更新