Announcement

Collapse
No announcement yet.

Tips for writing merge friendly code

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Tips for writing merge friendly code

    Hi,
    I'm just wondering if there are any practical tips how write merge friendly code (in Delphi).
    i use Beyond Compare with git.

    Most of the time BC handles our merge conflicts very well (even if Format source code is used in another branch)
    One of frequent problems occurs when (similar) code is added to same area of unit at same time.
    For example two procedures or classes are added to same utility unit in different branches.
    Thanks.


  • #2
    Hello,

    From BC4's perspective, the best thing is to properly load the common Ancestor into the center/middle Input pane. This helps with the merge logic. However, if a change exists on the same line in Left vs. Right, then as a conflict, it has to be merged manually.

    The View menu -> Favor Side commands can help reduce the number of visible differences to review, if you are ok ignoring specific sided changes.
    Aaron P Scooter Software

    Comment

    Working...
    X