Suppose I tried someone git repo and committed commits A, B, C and D. Perk, which I forked, then cherries selects A and C, so they become A 'and C'. It also commits X, Y, and Z. So after all this, my branch has ABCD and it has A 'C' XY Z. Suppose both branches are published, so rebase is not an attractive option. Also suppose XYZ does not conflict with any of the ABC D. How can I merge these two branches in a useful way? Should I just merge and then manually resolve everything? Is there anything I can do to duplicate commit messages in the log of a merged chapter? From now on, do these two branches, doomed to synchronization only by collecting cherries, commit?
Direct merging should work. Git should notice identical change sets and will not try to merge A / A 'or C / C'. If X, Y, or Z touched the same code as A '/ C', you might have to resolve conflicts there, especially if B or D touched the same code.
You can always git merge --no-commitcheck the result to find out what you expected.
git merge --no-commit
In the absence of conflict, a direct merger is obvious. If there are conflicts, though ...
C ', - , , . , C B C ' , - B C D A, A' no-op ..
:
git merge --strategy=ours C'
, . X Y Z A B C D, . - C C ', C', , .
Source: https://habr.com/ru/post/1780770/More articles:How to view indexes that I set in MySQL? - databaseZend Framework Session Lost - phpSample Android using H2 - androidOpengl polygons - renderingИспользование Caliburn.Micro для привязки к под-свойствам - silverlightWhat is the Java equivalent for a PHP array with non-numeric keys? - javavoice over internet iphone sdk - iphoneSaving and retrieving an image using Qt - qteBay API - Filter Items by Shopping / Custom Categories - ebaySearch for old .Net librairies - .netAll Articles