Eclipse EGIT:当前分支未配置为拉 [英] Eclipse EGIT: Current branch not configred for pull

查看:556
本文介绍了Eclipse EGIT:当前分支未配置为拉的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在和我的一个朋友一起工作在一个瓦片的角色扮演游戏,我必须离开几个星期,我们决定是时候使用版本控制/ git了。我开始后悔了几个小时后,我们设法使其工作到:


  1. 我在github上创建一个存储库,将他添加为协作者。 / li>
  2. 我将eclipse中的项目提交到git,push

  3. 他拉,将其导入工作区

  4. 我做了一些改变,提出推动,他拉动了变化。

  5. 他进行了一些更改,提交并成功推送。更改出现在

      [branchmaster] 
    remote = origin
    merge = refs / heads / master

    为了解决这个问题,一种方法是重命名你当前的 master 分支,在 Git Repositories 视图:




    • 右键单击$ code>分行/切换到/新分行

    • 下拉来源参考列表,选择 master branch(拉策略合并结帐新分支) $ b
    • 点击



    新分支应该正确配置


    I am working on a tilebased RPG with a friend of mine who has to go away for weeks and we decided it was time to use version control/git. I am starting to regret that. After a few hours we managed to get it working to the point where:

    1. I create a repository on github, add him as collaborator.
    2. I commit project in eclipse to git, push
    3. He pulls, gets it imported in his workspace
    4. I make some changes, commit push, he pulls the changes.
    5. He makes some changes, commits and pushes successfully. Changes appear in repo
    6. I try to pull changes, get errors (see image), unsuccessful.
    7. I make some changes, try to commit, get errors, unsuccessful.

    Essentially we are locked with a project he can update and I cannot. I am the repo owner if that matters at all.

    On trying to "Fetch from upstream":

    On trying to "Pull":

    On commit&push:

    We are pretty much stuck now. We rather not use skype to send files, at some point we are going to be professionals and that seems too tedious.

    As requested:

    解决方案

    The error message "This branch is not configured for pull" in EGit is typical of a branch created locally and pushed.

    That wouldn't set the merge section of that branch.
    See "The current branch is not configured for pull No value for key branch.master.merge found in configuration"

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

    To solve that, one way is to rename your current master branch, and, in the Git Repositories view:

    • Right-click on "Branches" / "Switch to" / "New Branch"
    • pull down "Source ref" list, select "master" branch (pull strategy "merge", "Checkout new branch" checked)
    • click "finish"

    The new branch should be correctly configured

    这篇关于Eclipse EGIT:当前分支未配置为拉的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆