Eclipse中Pull参数问题

来源:互联网 发布:淘宝拿货网 编辑:程序博客网 时间:2024/06/15 16:27

ccs V5,4 push时,报错

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

一直以来被一个问题困扰就是我的项目不能Pull,我就很纳闷了,这个为啥呢...

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

你们见到这个错误是不是无助,我当初也是,我把所有能调整的都试了一遍,还是不行.

没有法子就去求助Google大神,果然在StackOverflow找到答案.

其实我也用过桌面端,在桌面端.Pull是单独一个命令,和Push,Fetch是一样.但是我们一般都是配置Push和Fetch,很少有人会说,我去配置Pull,总觉得Fetch配置好,Pull就行了,其实这个错误的.

解决问题的网址:http://stackoverflow.com/questions/8820668/the-current-branch-is-not-configured-for-pull-no-value-for-key-branch-master-mer

当然都是英文的,我们姑且当自己是老外吧,这个里面核心内容就是配置Pull参数.

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.

大体意思,就是你要设置本地和远程的分支的对应的值,就是如果从远处Git库中master拉下内容,合并到本地分支(当然默认是本地主分支head),这样相当在你提交,我也提交,我Pull下全部代码,Merge无误了,就可以提交我的了.是不是很方面呢.


你可以打开Config文件,添加上面的内容,也可以点击Add Entry,设置Key-Value值就可以了.


0 0
原创粉丝点击