Managing merge conflicts

Merge conflicts are a normal part of working in Git. Learn why they happen and how to resolve them with ease.

Start free course Join 16596 others!

social preview

Merge conflicts happen when two people make changes to the same file on GitHub—a common occurrence when you’re working with other developers. While resolving differences might involve some discussion, merge conflicts don’t have to be scary.

This course guides you through the steps to finding the best merge conflict solution, so your team can keep building.

What you'll learn

We'll answer common questions like:

  • What is a merge conflict and what causes them?
  • How do you resolve merge conflicts?
  • How do you reduce merge conflicts?

And when you're done you'll be able to:

  • Understand how merging happens and what causes merge conflicts
  • Resolve simple and complex merge conflicts with ease
  • Share best practices to reduce merge conflicts with your team

What you'll build

resume

Prerequisites

We recommend taking Introduction to GitHub prior to this course.

Projects used

This makes use of the following open source projects. Consider exploring these repos and maybe even making contributions!

  • resume-template: A simple Jekyll + GitHub Pages powered resume template
  • Jekyll: a simple, blog-aware, static site generator.

Audience

New developers, new GitHub users, users new to Git, students, managers, teams

Steps to complete this course 7
  1. Resolve a conflict

    Resolve your first merge conflict

  2. Merge the first resolved pull request

    Merge the pull request that holds your first, simple conflict

  3. Resolve conflicts in a more complex pull request

    Resolve the merge conflict in a more complex pull request

  4. Merge the pull request

    Merge the pull request

  5. Create your own conflict

    Commit changes to the _data/education.yml file on the add-education branch in the 'Create Your Own Conflict' Pull Request

  6. Resolve conflicts created

    Resolve the conflict in the 'Create Your Own Conflict' pull request

  7. Merge the third pull request

    Merge the 'Create Your Own Conflict' pull request

Tags
Git
Merge conflicts
GitHub
Share Managing merge conflicts
Average time to complete

26 minutes

Free

All public courses on Learning Lab are free.

Latest release

Learning Paths that include this course

Users who took this course also took

What is GitHub Learning Lab?

Learn new skills by completing fun, realistic projects in your very own GitHub repository.

Ready to start learning?

Start Managing merge conflicts