EasyEnv
Engineering/Courses/Catalog/Git/Resolving Merge Conflicts
Git
BeginnerLesson 4 of 1330 min · hands-on

Resolving Merge Conflicts

Part of the Git course

The first time Git refuses to finish a merge, it can feel like something broke. Nothing broke. A merge conflict happens when two branches changed the same lines of the same file in different ways, and Git genuinely cannot guess which version you want to keep.

This lesson needs a conflict to resolve, so this block builds one: a hello-git repository in this lesson's folder where main and a feature-login branch each added a different sentence at the same spot in README.md. Press Play to create it (pressing it again starts over) ...

Want to learn Git Resolving Merge Conflicts in a real environment?

Click below, get a fresh Linux box with Git ready to go, and work through Resolving Merge Conflicts hands-on with an AI tutor that knows your code.

Start this lessonResolving Merge Conflicts

What you'll learn

  • Merge conflict markers
  • Manual resolution
  • Git add after resolving
  • Git merge --abort
  • Mergetool

Read this lesson in your language

All lessons in this course

13 lessons
  1. 1Init and Your First Commit25 min
  2. 2Status, Diff, and Log25 min
  3. 3Branches and Merging30 min
  4. 4Resolving Merge Conflicts30 min
  5. 5Remotes: Push, Pull, Fetch30 min
  6. 6Stash and Cherry-pick25 min
  7. 7Rebasing30 min
  8. 8Interactive Rebase and Squashing30 min
  9. 9Tags and Releases20 min
  10. 10Branching Workflows20 min
  11. 11Recovering Lost Work25 min
  12. 12Hooks25 min
  13. 13Capstone: A Full Pull Request Flow40 min

Explore other courses

Resolving Merge Conflicts - Git (English) | Engineering Courses