美文网首页
git常见错误整合

git常见错误整合

作者: 鸵鸟要抬头 | 来源:发表于2016-12-16 13:13 被阅读0次

    1、fatal: cannot lock ref 'HEAD':解决方法重新创建Head

    echo ref: refs/heads/master >.git/HEAD

    2、Updates were rejected because the tip of your current branch is behind

    git fetch origin master

    git commit 

    git merge origin/master

    git push

    3、master -> master (non-fast-forward)

    可以通过如下命令进行代码合并【注:pull=fetch+merge]

    git pull --rebase origin master

    此时再执行语句 git push -u origin master即可完成代码上传到github


    http://jingyan.baidu.com/article/f3e34a12a25bc8f5ea65354a.html

    http://www.jianshu.com/p/835e0a48c825

    相关文章

      网友评论

          本文标题:git常见错误整合

          本文链接:https://www.haomeiwen.com/subject/dvynmttx.html