【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:\david\xiaobing.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了


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM