Data EngineeringFDE engineering foundations

Resolve a Git conflict by understanding both changes

PK
Pankit Kumar
Sr. Data Scientist at Parexel (a Goldman Sachs–backed company) · 20 September 2026 · 2 min read
Technically reviewed by Ishaan Sharma
In this article (3 sections)

A conflict says Git cannot choose safely. Picking “ours” or “theirs” without understanding the base can discard valid work from either branch.

Preserve both independent changes

The engineering foundations lab models a config conflict.

python
from engineering_cases import merge_conflict_case

result = merge_conflict_case()
assert result["base"] == {"timeout": 5, "retries": 2}
assert result["resolved"] == {"timeout": 8, "retries": 3}
assert all(result["tests"].values())
assert result["markers_remaining"] is False

One branch raises timeout; the other raises retries. The semantic resolution keeps both.

Read the base and commits that introduced each change. Identify intent, invariants and downstream callers. Edit a coherent result, remove all markers, then run targeted tests and broader checks affected by the merge. Review the staged diff as one new change.

For delete/modify or schema conflicts, contact the other author when intent is unclear. Record a decision if the resolution changes behaviour. Avoid resolving generated files directly when their source can be regenerated.

The FDE for Freshers course uses conflict resolution to teach collaborative reasoning rather than button memorization.

Exercise

Create two branches that change separate aspects of one function and one shared assertion. Merge, explain the base/ours/theirs intent and prove the final tests cover both.

Continue learning

This article is part of the FDE engineering foundations sequence. Use the neighbouring tasks when you need the prerequisite or the next application.

Reference: GitHub merge-conflict documentation.

PK
Pankit Kumar
Lead Instructor, NeuraPath Academy

Pankit Kumar has 10 years in Data Science & AI, building and shipping production systems in regulated pharma and clinical environments. He is a freelance trainer at Boston Institute of Analytics, AnalytixLabs and Scaler, and has taught this material to thousands of working professionals.

This article is part of our FDE for Freshers programme — 6–7 months. Build your engineering foundations, then take AI from discovery to delivery.

Explore FDE for Freshers
Counselling is free · no obligation

Not sure which programme fits?

Tell us your background and we will map it to the right entry point — including saying so when a cheaper programme is the better fit. A counsellor replies within one working day.