방금 분기 'branch1'과 'branch2'두 개를 병합했습니다. 문제는 현재 많은 충돌이있는 엉망이며 때로는 중복 된 내용이있는 것입니다 (가능합니까 ??).파일을 파일별로 병합하기 - git
내가하고 싶은 것은 'branch1'의 일부 파일을 'branch2'와 병합하고 'branch2'의 일부 파일을 'branch1'과 병합하도록 강제하는 것입니다. 이제 ' branch1 '. 가능한가?
업데이트 : git-merge에 문제가있는 것 같습니다. 참조, 두 번 나타납니다 다음
echo $this->fetch('prehome.html');
die;
, 나는 BRANCH1 버전을 유지한다고 가정
protected function prehomepage()
{
$var = 'myvar';
echo $this->fetch('prehome.html');
die;
}
<<<<<<< HEAD
$this->mySmarty->assign('title', 'Primagora');
echo $this->fetch('prehome.html');
die;
}
/**
* Generate the campaign block for the general sidebar, called through AJAX.
*/
protected function getCampaignBlock()
{
$from = Utils::fromGet('from');
echo $this->getCampaignSidebarBlock($from);
die();
}
=======
/**
* Generate the campaign block for the general sidebar, called through AJAX.
*/
protected function getCampaignBlock()
{
$from = Utils::fromGet('from');
echo $this->getCampaignSidebarBlock($from);
die();
}
>>>>>>> branch2
항상 병합을 강제로 처리하는 대신 충돌을 해결하는 것을 선호합니다. 비록 당신이 확인할 수 있습니다 [자식 - 병합 - 파일] (http://git-scm.com/docs/git-merge-file) – Rikesh
문제는 자식이 실수를하는 것 같습니다 : 예를 들어 나는 둘 다 브랜치와 병합 한 후 하나의 브랜치에 나타납니다. >>> branch2 – Newben
git은 코드를 제거하지 않고 그 브랜치를 제거하고 브랜치를 커밋합니다. 다른 지점에서도 마찬가지다. – Rikesh