learning-it by example

Back to the video

Git Merge Conflicts: Check Before You Accept a Fix

Three one-click resolutions left no conflict markers, and each one still failed a test.

Video #179 ยท AI coding and productivity

Steps in the video

  1. 0:00 No markers, still failing tests
  2. 0:35 The idea
  3. 1:02 Setup
  4. 1:30 A throwaway repo
  5. 1:59 Two branches, one spot
  6. 2:31 One click resolutions
  7. 2:52 Lost lines and tests
  8. 3:22 A message from the diff
  9. 4:55 What this does not show
  10. 5:20 Mistakes to avoid
  11. 5:48 My take and next steps
  12. 6:14 Recap

Files

  • checks.py (41 lines)
  • message.py (18 lines)
  • repo.py (28 lines)
  • run.py (53 lines)
  • versions.py (17 lines)

Download the code (zip)

Tested with

Python 3.12.15

What this does not show

One tiny made-up conflict in a temp repo; no AI tool is run, the three tests are my reading of each branch's intent, and the lost-lines check compares whole lines only.

Sources

Learning IT by Example.