Git拉取问题

发布于 2024-08-15 19:06:02 字数 1153 浏览 1 评论 0原文

我在本地计算机上创建了一个新分支“counterflow”,并编辑了 .git/config 文件,使其看起来像:

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[remote "origin"]
    url = ssh://host/~/Repositories/CFFC.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master
[branch "counterflow"]
    remote = origin
    merge = refs/heads/counterflow

CFFC.git 是一个裸存储库。现在我试图从另一台机器上拉出“逆流”分支。这台机器上的 .git/config 文件如下所示:

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[remote "origin"]
    url = ssh://host/~/Repositories/CFFC.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master
[branch "counterflow"]
        remote = origin
        merge = refs/heads/counterflow

我收到以下错误消息:

Warning: No merge candidate found because value of config option
         "branch.counterflow.merge" does not match any remote branch fetched.
No changes.

有任何线索出了什么问题吗?

谢谢

I made a new branch "counterflow" on my local machine and edited my .git/config file to look like:

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[remote "origin"]
    url = ssh://host/~/Repositories/CFFC.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master
[branch "counterflow"]
    remote = origin
    merge = refs/heads/counterflow

CFFC.git is a bare repository. Now I am trying to pull the "counterflow" branch from a different machine. The .git/config file on this machine looks like this:

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[remote "origin"]
    url = ssh://host/~/Repositories/CFFC.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master
[branch "counterflow"]
        remote = origin
        merge = refs/heads/counterflow

I am getting the following error message:

Warning: No merge candidate found because value of config option
         "branch.counterflow.merge" does not match any remote branch fetched.
No changes.

Any clues whats going wrong?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

纸短情长 2024-08-22 19:06:02

我想通了。我忘记在裸存储库中创建分支“counterflow”。

I figured it. I forgot to create the branch "counterflow" in the bare repository.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文