fix: proper check when verifying a merge

This commit is contained in:
Bjarke Sporring
2026-01-21 11:39:30 +01:00
parent 39d8ace75c
commit c69b463f84
2 changed files with 21 additions and 16 deletions

View File

@@ -22,16 +22,16 @@ This creates a repository with two feature branches that have conflicting change
## Overview
A **merge conflict** occurs when Git cannot automatically combine changes because both branches modified the same part of the same file in different ways.
A **merge conflict** occurs when git cannot automatically combine changes because both branches modified the same part of the same file in different ways.
**When do conflicts happen?**
- ✅ Two branches modify the same lines in a file
- ✅ One branch deletes a file that another branch modifies
- ✅ Complex changes Git can't merge automatically
- ✅ Complex changes git can't merge automatically
- ❌ Different files are changed (no conflict!)
- ❌ Different parts of the same file are changed (no conflict!)
**Don't fear conflicts!** They're a normal part of collaborative development. Git just needs your help to decide what the final code should look like.
**Don't fear conflicts!** They're a normal part of collaborative development. git just needs your help to decide what the final code should look like.
## Your Task
@@ -249,7 +249,7 @@ For this challenge, we want **both settings**, so:
### Part 9: Mark the Conflict as Resolved
Tell Git you've resolved the conflict:
Tell git you've resolved the conflict:
```bash
# Stage the resolved file
@@ -267,7 +267,7 @@ All conflicts fixed but you are still merging.
(use "git commit" to conclude merge)
```
Perfect! Git confirms the conflict is resolved.
Perfect! git confirms the conflict is resolved.
### Part 10: Complete the Merge
@@ -277,7 +277,7 @@ Commit the merge:
git commit
```
Git will open an editor with a default merge message. You can accept it or customize it, then save and close.
git will open an editor with a default merge message. You can accept it or customize it, then save and close.
**Done!** Your merge is complete!
@@ -436,7 +436,7 @@ git diff main..feature-branch
## Merge Tools
Git supports visual merge tools that make resolving conflicts easier:
git supports visual merge tools that make resolving conflicts easier:
```bash
# Configure a merge tool (one-time setup)
@@ -484,4 +484,4 @@ To start over:
.\setup.ps1
```
**Need help?** Review the steps above, or run `git status` to see what Git suggests!
**Need help?** Review the steps above, or run `git status` to see what git suggests!