Git合并分支冲突标记分辨率 [英] Git Merge Branches Conflict Marker Resolution
本文介绍了Git合并分支冲突标记分辨率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我将一个名为 temp-fix
的分支合并到 master
分支中。目前,我正在努力解决合并冲突。我想接受来自 temp-fix
的所有更改。
I am merging a branch called temp-fix
into the master
branch. At the moment, I am working on resolving merge conflicts. I would like to accept all changes that came from the temp-fix
.
我如何在下面的冲突标记中做到这一点?
也就是说,我应该删除哪些代码,并让这些代码按计划运行?
How could I do it given the conflict markers below? That is, which code should I delete and which leave in place for this to work as planned?
<<<<<<< HEAD
/**
* fetch count(order_no) need to disable/grey out the departmental membership.
*/
function personify_count_departmental_membership($masterid) {
$pdb = new PersonifyDB();
$sql = "select count(order_no)
from ORDER_DETAIL (nolock)
where subsystem = 'MBR'
and ship_master_customer_id = '$masterid'
and cycle_begin_date <= getdate() and grace_date >= getdate()
and line_status_code in ('A','P')
and parent_product = '';
$results = $pdb->p_query($sql);
||||||| merged common ancestors
=======
/**
* fetch count(order_no) need to disable/grey out the departmental membership.
*/
function personify_count_departmental_membership($masterid) {
$pdb = new PersonifyDB();
$sql = "select count(order_no)
from ORDER_DETAIL (nolock)
where subsystem = 'MBR'
and ship_master_customer_id = '$masterid'
and cycle_begin_date <= getdate() and grace_date >= getdate()
and line_status_code in ('A','P')
and parent_product = '';
>>>>>>> temp-fix
<<<<<<< HEAD
return $results;
}
||||||| merged common ancestors
=======
$results = $pdb->p_query($sql);
return $results;
}
>>>>>>> temp-fix
推荐答案
temp-fix 分支到 master 分支中,并希望保留temp-fix的所有更改,删除<<<<< << HEAD 和 =======
Since you are merging the temp-fix branch into the master branch and want to keep all changes of temp-fix, delete the code between <<<<<<< HEAD and =======
删除以下一段代码:
<<<<<<< HEAD
/**
* fetch count(order_no) need to disable/grey out the departmental
membership.
*/
function personify_count_departmental_membership($masterid) {
$pdb = new PersonifyDB();
$sql = "select count(order_no)
from ORDER_DETAIL (nolock)
where subsystem = 'MBR'
and ship_master_customer_id = '$masterid'
and cycle_begin_date <= getdate() and grace_date >= getdate()
and line_status_code in ('A','P')
and parent_product = '';
$results = $pdb->p_query($sql);
||||||| merged common ancestors
=======
<<<<<<< HEAD
return $results;
}
||||||| merged common ancestors
=======
>>>>>>> temp-fix
这篇关于Git合并分支冲突标记分辨率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文