Eclipse使用Git Pull代码失败(已解决)

Eclipse使用Git Pull代码失败


报错提示: The current branch is not configured for pull No value for key remote.origin
解决方案:

一、找到config文件

Window->Preferences->Team->Git->Configuration->open
如图:
点击open

二、修改.gitconfig内容

添加以下代码

[user]
    name = 你的git的用户名
    email = 你的git的邮箱
[core]
    repositoryformatversion = 0
    filemode = false
    logallrefupdates = true
[remote "origin"]
    url = 你的项目地址
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master

三、执行pull方法

若项目未更新提示:
未更新提示

若已更新则提示:
更新提示

猜你喜欢

转载自blog.csdn.net/Acceleactor/article/details/81366685