簡體   English   中英

使用Eclipse合並git中的沖突

[英]Merge conflict in git using eclipse

嗨,我在Eclipse中使用git面臨合並沖突。

基本上,我試圖同步兩個分支,即分支A和分支B。因此,在將分支B與分支A同步時發生沖突。 因此,為解決這些沖突,所有文件都被標記為已合並,並且已提交並推送。

但是同樣,當與分支B與分支A同步時,在沖突模式下將顯示相同的文件,而文件diff。中未顯示任何更改。

誰能建議如何解決這個問題?

從分支B(例如:開發)到分支A(例如:母版)的更改合並之前,獲取從分支A到分支B的最新更改並解決沖突

 $ git checkout branchB  # Ignore this if you've already in the branchB

 $ git merge branchA  # This will merge recursively and show conflicts if any. so resolve the conflicts and commit on 'branchA"

 $ git commit -m "resolving conflicts and merging from branchA to branchB"

 $ git checkout branchA  # Assuming this is master branch 

 $ git merge branchB  # Now this shouldn't show any conflicts since it's resolved earlier

現在branchA和branchB都具有相同的更改!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM