How GiTrip Merges Trip Plans

GiTrip uses three-way merge to combine divergent trip plans. Explore each scenario step by step to see how conflicts are detected and resolved.

Base

Source (Ours)

Target (Theirs)

Merged Result

Pseudocode

Unchanged
Modified
Added
Deleted
Conflict

Three-Way Merge

Like Git, GiTrip compares each branch against a common base snapshot. By knowing what the plan looked like before either branch changed it, the algorithm can tell who changed what and apply non-conflicting edits automatically.

Conflict Detection

A conflict occurs when both branches modify the same stop in incompatible ways — for example, changing arrival times to different values, or one branch deleting a stop the other edited. GiTrip flags these for manual resolution rather than guessing.

Automatic Resolution

When only one branch touched a stop, GiTrip takes that change automatically. It also computes a Jaccard similarity score between the two branches’ stop sets — if the plans diverged too much (similarity < 0.4), the entire plan is flagged as a whole-plan conflict.