BitBucket和合并冲突 [英] BitBucket and Merge Conflicts

查看:173
本文介绍了BitBucket和合并冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个代码源,该代码源具有3个分支:

I have a code source that has 3 branches to it:

master
Branch 1
Branch 2

我在Branch 2上工作,而另一个程序员在Branch 1上工作.

I'm working on Branch 2 while another programmer is working on Branch 1.

我最近在本地拉出所有更改后,将更改推到了我的分支机构.然后,我将分支与母版合并.

I have recently pushed my changes to my branch after having pulled any changes locally. Then I merged my branch with the master.

我现在正尝试将其分支与主服务器合并,但获得大量冲突列表.通常,我添加并同步到母版的内容与他在同一文件中添加的行相冲突.

I'm now trying to merge his branch with the master but get a HUGE list of conflicts. Mostly things I added and synced to the master are conflicting with lines he added in the same files.

我该如何决定保留他的哪些更改,以便将其合并并全部更新?

How do I decide which changes to keep of his so I can merge it all and bring it all up to date?

我尝试在bitbucket中创建一个拉取请求,但无法解决.我在拉请求中尝试编辑X文件,并在其中放置了我所知道的代码,但是在编辑后仍然存在冲突.

I tried creating a pull request inside bitbucket but couldn't get the hang of it. I tried inside that pull request editing X files and placing the Code I knew was good there, but the conflicts remained after edit.

推荐答案

  • 您的分支合并得很好,因为在创建branch1和将其合并回之前,master上没有任何更改
  • 因为branch2也起源于master-将master合并到branch2中以使其保持最新状态
  • 一旦branch2是最新的,您就可以轻松地将其合并回主版本
  • 这篇关于BitBucket和合并冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆