【问题标题】:Git Pull: EGit with GitHubGit 拉取:EGit 与 GitHub
【发布时间】:2012-12-28 19:12:08
【问题描述】:

我按照教程 http://wiki.eclipse.org/EGit/User_Guide#GitHub_Tutorial 使用 GitHub 设置 EGit。当我想拉时,我遇到了这里描述的同样问题:The current branch is not configured for pull No value for key branch.master.merge found in configuration

当我将以下内容添加到 .git/config 时

[branch "master"]
   remote = origin
   merge = refs/heads/master

我收到另一个错误:

当前分支未配置为拉取 在配置中找不到键 remote.origin.url 的值

我该如何解决这个问题?

【问题讨论】:

  • 您是否还有一个包含url = ...[remote "origin"] 部分?

标签: github branch egit master


【解决方案1】:

完整的 .git/config 文件应该是这样的:

[core]
    repositoryformatversion = 0
    filemode = false
    logallrefupdates = true
[remote "origin"]
    url = http://gitlab.funshion.com/gitlab/sandbox/try-conflict-resolution.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
        remote = origin
        merge = refs/heads/master

【讨论】:

    【解决方案2】:

    正如bug 352687 中提到的,这可能是因为您的 git 配置文件的远程部分不包含“origin”远程。

    请参阅 Egit 用户指南的"Adding a Remote Configuration " section
    如果您没有远程“origin”,您可以添加一个。

    (此示例定义了一个新的远程“pushtofile”,但是,如果您还没有一个名为“origin”的远程,您可以再次定义一个。)

    【讨论】:

    • 截图与 Kepler 中的 EGit 不同,其中使用单选按钮而不是复选框。所以一次只能 Push 或 Fetch 配置。
    猜你喜欢
    • 1970-01-01
    • 2019-12-08
    • 2018-06-04
    • 2016-07-08
    • 2015-03-23
    • 2014-04-30
    • 2015-10-17
    • 2012-09-20
    • 2010-12-15
    相关资源
    最近更新 更多