【问题标题】:cvs2git covert cvs to git and push multiple branches gets: error: src refspec master does not match anycvs2git 将 cvs 隐蔽到 git 并推送多个分支获得:错误:src refspec master 不匹配任何
【发布时间】:2014-10-20 15:33:37
【问题描述】:

我使用 cvs2git 将 cvs repo 转换为 git。这个项目/repo 有多个分支和标签。无论如何,我能够(没有收到任何错误消息)将此 cvs 存储库转换为 git。但是当我将 git 项目推送到 github 时,我收到了这个错误。我想可能是我把它推给大师,但我有多个分支。如果是这样,我怎样才能将多个分支推送到 github?谢谢!

这是我运行的命令:

git remote add origin https://github.com/mygithub/MyProject.git
git push -u origin master

Complete Error:
error: src refspec master does not match any.
error: failed to push some refs to 'https://github.com/mygithub/MyProject.git'.

【问题讨论】:

    标签: git github cvs cvs2svn cvs2git


    【解决方案1】:

    您的本地存储库中有一个名为 master 的分支吗? git branch 将向您展示您当地的分支机构。

    可能是你想做git push --mirror

    --mirror 不是命名每个要推送的 ref,而是指定 refs/ 下的所有 refs(包括但不限于 refs/heads/, refs/remotes/ 和 refs/tags/) 被镜像到远程存储库。 新创建的本地 refs 将被推送到远程端,本地 更新的 refs 将在远程端强制更新,并删除 refs 将从远端移除。这是默认值,如果 配置选项 remote..mirror 已设置。

    【讨论】:

    • 刚刚运行“git show-branch”并得到“没有要显示的转速”。我想我对“git fast-import”有一些问题。谢谢!
    猜你喜欢
    • 2012-05-21
    • 2011-08-13
    • 2014-02-11
    • 2023-01-30
    • 2018-05-30
    • 2012-09-09
    • 2022-07-14
    • 1970-01-01
    • 2017-03-05
    相关资源
    最近更新 更多