GitHub for Beginners #8: Fix Merge Conflicts in VS Code

Опубликовано: 14 Май 2026
на канале: Benjamin Day
315
4

Merge conflicts sound scary, but they're really just Git asking for help. In this video — part three of our collaboration series — we'll create a simple merge conflict scenario and then walk through exactly how to resolve it using VS Code.

What you'll learn:

What causes merge conflicts (two people editing the same code)
How to create a conflict using the GitHub web editor
Understanding Git's conflict marker syntax
VS Code's inline conflict resolution buttons (Accept Current, Accept Incoming, Accept Both)
The VS Code merge editor (three-pane view)
How to manually edit the merge result
The "Complete Merge" button — marking conflicts as resolved
Testing your code after resolving conflicts
Committing the merge resolution
Using Sync to push your resolved code

Key insights:

Merge conflicts aren't errors — Git is asking you to make a decision
Conflicts happen when the same lines are changed in two places
You can resolve conflicts directly in the text editor or use the merge editor
Pull frequently to minimize conflicts before they happen
Keep changes small and focused — easier to merge
Always test after resolving conflicts
The merge itself becomes a commit in your history
When editing directly on GitHub.com, you're committing straight to the remote — no push needed

What we'll do:

Make a small change as a teammate using the GitHub web editor (changing explicit types to var)
Switch to VS Code and make a local change to the same file
Attempt to sync — and trigger the conflict
Examine the conflict markers in the file
Walk through VS Code's merge editor step by step
Resolve the conflict with a combination of both changes
Push the resolved code back to GitHub

Previous Video: How to Fix Merge Conflicts in Visual Studio 2026
Next Video: What is Branching and Why Should You Care?
► Full Playlist: • GitHub for Beginners

Survived another merge conflict? You're getting good at this! Hit that like button to celebrate.
Subscribe and enable notifications — next up, we'll explore branching.
What do you prefer — VS Code or Visual Studio for resolving conflicts? Share in the comments!

#GitHub #Git #MergeConflicts #VSCode #Programming #Tutorial #GitHubForBeginners #dotnet #GitTutorial #Copilot

0:00 Intro
0:15 Make a code change using the web-based editor
1:50 Use 'git log' to view the history of the current repository
2:20 Start Visual Studio Code
2:45 The Copilot Snooze Button
3:34 Make some changes locally in VSCode
3:56 Commit the changes to git
4:19 Merge conflicts in the VSCode editor
5:48 Resolve conflicts using the Merge Editor
7:00 Complete the merge
7:36 Push the changes to GitHub
8:20 Outro / Thanks