Merge Conflict Practice

GitBeginnerProject

Practice resolving merge conflicts in a sample repository.

  1. Initialize a new repository and create a file:
  2. Create and switch to a new branch, make a change, and commit:
  3. Switch back to main, make a conflicting change, and commit:
  4. Try to merge the feature branch:

    You should see a merge conflict. Open file.txt and resolve the conflict, then run:

Merge conflicts are a normal part of collaboration. Practice resolving them!