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

来源:互联网 发布:唐山关键字优化公司 编辑:程序博客网 时间:2024/05/23 19:15

今天从Github 上pull 项目的时候遇到了一个问题:

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

 没办法同步工程了,网上查了下,多数是命令解决。如下为stackoverflow上的解决方案

Your local master branch is not set up to track remote master branch.

You could do git pull origin master to tell git the explicit branch you want to pull or you add this to your .git/config:

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

When you push to master for the first time, add the -u switch (git push -u origin master). This will set everything up automatically.

但是这样不太好操作,下面介绍如何在Eclipse上通过可视化界面操作。首先Window->Preference->Team->Git->Configuration->Repository Settings->选择你的repository,然后点open,你会看到config里的代码:

[core]repositoryformatversion = 0filemode = falselogallrefupdates = true

对比其他git项目,发现少了几个东西——[remote "origin"]、[branch "master"]。

现在对症下药,从其他git项目考出[remote "origin"]、[branch "master"]copy 到缺失的config里。再做相应update就OK





0 0
原创粉丝点击