admin管理员组文章数量:1612097
今天在将本地代码commit,然后push到github后,误删了本地代码文件,想通过pull同步github服务器与eclipse的代码,也是第一次进行pull操作,然而在eclipse中悬选择了项目后,team-pull,提示the current branch is not configured for pull,no value for key remote.origin.url found in configuration,记录下解决方法:
根据提示知道,config文件中缺少了remote.origin.url参数,则在eclipse-window-preferences,找到git-configuration-repository settings,repository选择当前项目,可查看到当前config的配置,此时一般只有一个core项参数,需要添加branch和remote参数,按下图添加
[core]
repositoryformatversion = 0
filemode = false
logallrefupdates = true
[branch "master"]
remote = master
merge = refs/heads/master
[remote "master"]
url = git服务器上该项目的地址
fetch = +refs/heads/*:refs/remotes/origin/*
注:以上标紫色的字段需保持一致,否则pull还是会提示找不到url,可以填origin或master或其他已建分支;url地址自定义,我填写的是自己项目在git服务器上的地址。
如果是出现提示:the current branch is not configured for pull,no value for key branch.modify.merge found in configuration.则是因为在config文件中没有创建branch,仅需要在config文件中添加branch参数:
[branch "xxx"]
remote = origin
merge = refs/heads/xxx
本文标签: 提示pullEclipseconfiguredbranch
版权声明:本文标题:eclipse pull提示the current branch is not configured for pull 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/xitong/1728630066a1166981.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论