今天看啥  ›  专栏  ›  magic_kid_2010

gitlab 分支合并 冲突处理

magic_kid_2010  · CSDN  ·  · 2020-03-08 22:28

1、使用 gitlab 创建合并请求

master 合并到 branch_test --> compare branches and continue --> submit merge request

提示:合并冲突。

2、使用 idea 打开项目。

(1)执行:git fetch origin

(2)切换到 master 分支,更新到最新版本。

(3)切换到 branch_test 分支,更新到最新版本。

(4)执行:git merge --no-ff master

(5)打开冲突文件,解决冲突。

冲突提示:

<<<<<<< HEAD
=======
//    @Scheduled(cron = "0 */1 * * * ?")
>>>>>>> master
    @Scheduled(initialDelay = 10000, fixedRate = 70000)

处理冲突:

//    @Scheduled(cron = "0 */1 * * * ?")
    @Scheduled(initialDelay = 10000, fixedRate = 70000)

解决冲突:

鼠标右键 --> git --> resolve conflict

(6)提交合并

git commit -m "reslove conflict"

(7)推送到远程分支

git push origin branch_test:branch_test

作者:magic_kid_2010,如果觉得笔者的博客对您有所帮助,欢迎【 犒赏




原文地址:访问原文地址
快照地址: 访问文章快照