zoukankan      html  css  js  c++  java
  • GIt-解决冲突

    多人向仓库中push,就可能导致冲突。

    比如比人把var sd = "wo shi 2222";已经push到仓库,而你本地没有,你只有这句var dd = "wo shi jinwei";想Push上去,就会报错

    Updates were rejected because the remote contains work that you do not have locally. 
    This is usually caused by another repository pushing to the same ref.
    You may want to first integrate the remote change(e.g., 'git pull ...') before pushing again.
    See the 'Note about fast-forwards' in 'git push --help' for details.

    因为仓库中有的,你没有,所以有冲突,那么按提示Pull,也提示合并失败,打开冲突代码看,

    Pulling is not possible because you have unmerged files.Fix them up in the work tree, and then use 'git add/rm <file>' as appropriate to mark resolution and make a commit.
    fatal: Exiting because of an unresolved conflict.

    <<<<<<<=======>>>>>>>这个会标志有冲突的代码。

    =======之前的是你本地的,之后的是仓库中的,一般要是2个都可以存在,那就把这些标志去掉即可,然后编译,add,commit 再push一次.



  • 相关阅读:
    管理信息系统 第三部分 作业
    密码保护
    实现搜索功能
    完成个人中心—导航标签
    个人中心标签页导航
    评论列表显示及排序,个人中心显示
    完成评论功能
    管理信息系统 课程设计
    期末作品检查
    管理信息系统 第三部分 作业
  • 原文地址:https://www.cnblogs.com/JinweiChang/p/12425298.html
Copyright © 2011-2022 走看看