【问题标题】:Getting error while adding intellij project to gitlab将intellij项目添加到gitlab时出错
【发布时间】:2021-07-09 01:57:58
【问题描述】:

做了以下事情:

我收到以下错误

错误:src refspec master 不匹配任何内容

错误:未能将一些参考推送到“https://gitlab.com/xxxxxx/tmp.git”

【问题讨论】:

    标签: intellij-idea gitlab push


    【解决方案1】:

    在 GitHub 上创建的远程存储库的主分支很可能具有分支 main(参见 GitLab documentation)

    • 要么你把你的本地 master 推送到 main:

        git push -u origin master:main
      
    • 或者(更好)你将本地分支重命名为 main

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

    【讨论】:

    • @Xutv 您是否检查了在远程端创建的存储库中默认分支的名称? git status 返回什么(它应该显示您本地分支的名称)。本地分支的名称是否与远程存储库中的名称相同?
    猜你喜欢
    • 2020-07-31
    • 1970-01-01
    • 2014-03-22
    • 1970-01-01
    • 1970-01-01
    • 2018-04-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多