您的位置:首页 > 其它

git 问题

2015-08-04 13:18 369 查看
1.Pushing to git@github.com:rickyfeng/wenda.git
To git@github.com:rickyfeng/wenda.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com:rickyfeng/wenda.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again.  See the
'Note about fast-forwards' section of 'git push --help' for details.



Merge the remote changes (e.g. 'git pull') before pushing again.

意思你改动的内容变化之前已经有变化了,你可能还不知道,所以你需要先merge一下,合并一下文件。然后才能同步上去的。


2.Git hub pull时候的错误 : The current branch is not configured for pull No value for key branch.master.mer
1.在本地工程目录找到config文件(我的是在E:\rocket\rocket\.git);
2.修改config文件内容为:
[core]
    repositoryformatversion = 0
    filemode = false
    logallrefupdates = true
    [branch "master"] 
        remote = origin 
        merge = refs/heads/master 
    [remote "origin"] 
        url = https://github.com/androidzhaoxiaogang/rocket.git   (修改为自己的url)
        fetch = +refs/heads/*:refs/remotes/origin/*
3.再执行pull方法,发现工作ok了
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: