100-Days-Of-DevOps-Challenge-KodeKloud

Git Merge Conflict Resolve

Sarah and Max were working on writting some stories which they have pushed to the repository. Max has recently added some new changes and is trying to push them to the repository but he is facing some issues. Below you can find more details:

Note: For these kind of scenarios requiring changes to be done in a web UI, please take screenshots so that you can share it with us for review in case your task is marked incomplete. You may also consider using a screen recording software such as loom.com to record and share your work.

Steps

  1. Login into storage server
  2. Update the remote changes

     git fetch origin
    
  3. Rebase

     git rebase origin/main
    
     git add .
    
     git rebase --continue
    
  4. Push

     git push
    

Good to Know?

Merge Conflicts

Conflict Markers

Resolution Process

  1. Identify Conflicts: Git marks conflicted files
  2. Edit Files: Manually resolve conflicts
  3. Stage Changes: git add resolved files
  4. Continue: git rebase --continue or commit merge
  5. Test: Verify resolution works correctly

Prevention Strategies