GIT / A CONCEPT NOTE
Merge Conflicts
when two truths collide
Overview · mechanism
pitfall · examples
01 / THE SHORT VERSION
The idea in a few sentences.
Conflicts happen when two branches modify the same line in a file. Git stops the merge process, marking the conflicted lines in code for you to resolve manually.
02 / FOLLOW THE MECHANISM
How conflict resolution flows
Collision
runs git merge. Git finds conflicting line changes.
Mark tags
git writes marker tags (<<<<<<< HEAD and >>>>>>> branch) in files.
Resolution
developer edits files, deleting markers and keeping target code version.
Complete
staged files are committed, completing the merge conflict resolution.
04 / COMMAND NOTES
Read the command, then the result.
Inspect the flags and arguments before trying an example. Snippets can need local setup, replacement values, or resources in your own environment.
inspect marked conflict tags in workspace files
git diffcancel merge process, returning workspace to pre-merge state
git merge --abort05 / CHECK YOURSELF
Could you explain Merge Conflicts to a teammate?
Try it out loud in two sentences: what it is, and the one detail that changes the picture. If you stall, the gap is the part to reread.
Up next in Git & collaborationTags & Releasespinning a moment in history