A merge conflict was "resolved" by deleting the other dev's code. Root cause: Accepting one side of a conflict without reading it. The fix: Resolve conflicts deliberately; verify with `git diff` post-merge.
A production war story from the TheCodeForge Git series — the incident, why it happened, and the exact fix.
⏳ Timestamps:
0:00 - Cold open: 12 engineers got 'Your branch and origin/develop have diverged'
0:12 - Intro
0:18 - What Is a Git Branch?
0:36 - Merge vs Rebase
1:14 - Creating and Managing Branches
1:47 - Merge Mechanics
2:23 - Rebase Mechanics
2:58 - Resolving Merge Conflicts
3:37 - Fast-Forward vs 3-Way Merge
4:14 - Branch Strategies Overview
4:52 - GitHub Flow & Trunk-Based
5:09 - Pull Requests as Gates
5:40 - Release Branches
6:12 - 12 engineers got 'Your branch and origin/develop have diverged'
6:39 - Force-push rewrites shared history
6:53 - The Fix
7:21 - ⚠ Gotcha: Rebasing a branch others have pulled
7:38 - ⚠ Gotcha: Using `--force` instead of `--force-with-lease`
7:57 - Version Caveat: `git switch` Requires Git 2.23+
8:34 - Production Caveat: `--force-with-lease` Is Not a Silver Bullet
9:01 - Debugging Guide
9:20 - Interview Questions
9:46 - FAQ
10:10 - Key Takeaways
10:30 - Next up
10:40 - Wrap-up
👉 Full article + code: https://thecodeforge.io/devops/git-br...
⏭ Next up: Git Rebase vs Merge
#git #devops #versioncontrol