2013-07-03 77 views
1

我在我的mac上使用我的git存儲庫的源碼樹。我合併了兩個在product.php中有衝突的分支。現在我有以下文件:手動解決與源樹的git合併衝突

product.php.BACKUP.43706.php 
product.php.BASE.43706.php 
product.php.LOCAL.43706.php 
product.php.REMOTE.43706.php 

我想將它們與我最喜歡的編輯器合併。爲此我想擁有一個帶有以下注釋的文件,我認爲這將是git的本地行爲。

<<<<<<< HEAD:index.html 
<div id="footer">contact : [email protected]</div> 
======= 
<div id="footer"> 
    please contact us at [email protected] 
</div> 
>>>>>>> iss53:index.html 

上找到:http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging

我怎麼能拿我的合併文件?

非常感謝。

+0

我發現,該product.php是文件,我搜索了。只有衝突,但不是正常的「合併」。是否有可能手動做到這一點,並得到它在衝突文件? – noeden

回答

0

你不必處理它們。只要使用diff命令

git diff <first branch> <second branch> path/to/file 

它會告訴你區別,讓你手動合併