zoukankan      html  css  js  c++  java
  • git merge笔记

    ==从分支dev合并到master==

    git checkout dev
    git pull
    git checkout master
    git merge dev
    git push -u origin master

    ==从master合并到分支dev==

    git checkout master 
    git pull 
    git checkout dev
    git merge master 
    git push -u origin dev

    ==遇到的问题==

    2021/5/14

    执行git merge时报错

    CONFLICT (modify/delete): rexel-core/src/test/java/com/rexel/test/CodeCounter.java deleted in HEAD and modified in master. Version master of rexel-core/src/test/java/com/rexel/test/Cod
    eCounter.java left in tree.
    CONFLICT (modify/delete): rexel-core/src/main/resources/mybatis/business/WaterElectricCostMapper.xml deleted in HEAD and modified in master. Version master of rexel-core/src/main/resou
    rces/mybatis/business/WaterElectricCostMapper.xml left in tree.

    如果代码冲突的时候,需要强制使某一方生效,可以在下面的页面执行。

    通过git status查看merge结果,可以看到有文件冲突。我的分支上把没有用的东西删除掉了,与master冲突。

    解决办法

    git add .
    git commit -m '解决冲突'
    git pull origin master
    git merge master
  • 相关阅读:
    IO编程
    File类
    对于Java集合理解
    Java泛型
    多线程编程
    异常处理
    Static.final修饰符、super关键字及常量与变量
    java类的基本结构
    数组
    二叉树后序遍历 递归 非递归
  • 原文地址:https://www.cnblogs.com/quchunhui/p/14769704.html
Copyright © 2011-2022 走看看