Good Code
The good version identifies conflicted files, compares both sides, edits the resolved file, runs tests, and stages only the resolution.
Lesson 07
Resolve conflicts by understanding both sides, then stage only the corrected files instead of blindly taking one version.
# Read the conflicted file before choosing a resolution.
git status
git diff --merge src/lesson.ts
code src/lesson.ts
npm test
git add src/lesson.ts
git rebase --continue# Taking one side for every file can erase local intent.
git checkout --theirs .
git add .
git rebase --continue
git push --forceThe good version identifies conflicted files, compares both sides, edits the resolved file, runs tests, and stages only the resolution.
The bad version takes the other side for every file and force-pushes, which can silently discard local work or domain decisions.