【JAVA】Eclipse中使用git进行pull远程代码

当使用eclipse或者MyEclipse进行pull远程代码的时候,或者github的代码的时候报如下错误代码;

代表我们没有配置我们的Git地址,这里我教大家配置一下。首先下面是错误代码:

The current branch is not configured for pull
No value for key branch.master.merge found in configuration
 
  • 1

解决方法:

  1. 在我们本地工程目录找到config文件(如我的是E:davidxiaobing.git);

  2. 修改config文件内容为:

[core]
    repositoryformatversion = 0
    filemode = false
    logallrefupdates = true
    [branch "master"] 
        remote = origin 
        merge = refs/heads/master 
    [remote "origin"] 
        url = https://github.com/QQ986945193/DavidAndroidProjectTools.git
                (修改为自己的url,然后去掉此括号中的内容即可)
        fetch = +refs/heads/*:refs/remotes/origin/*
  • 1
  • 2
  1. 最后再执行pull方法,发现工作ok了
原文地址:https://www.cnblogs.com/qlqwjy/p/7470573.html