Skip to content

Solving Merge Conflicts

Sk Niyaj Ali edited this page Dec 25, 2024 · 1 revision

In some cases, your pull request might encounter merge conflicts when the changes cannot be automatically merged with the main branch. To resolve merge conflicts:

  1. Update your local branch with the latest changes from the main repository:

    git fetch upstream

    git checkout your-branch-name

    git rebase upstream/master

  2. Git will pause when encountering conflicts. Open the affected files, resolve the conflicts manually, and save the changes.

  3. After resolving all conflicts, stage the changes and continue with the rebase:

git add .

git rebase --continue

  1. Finally, force push the changes to your forked repository:

git push --force origin your-branch-name

Your pull request will be updated with the resolved conflicts, and the reviewers can proceed with the review process. Again, don’t forget to squash your commits.

Demo Credentials

  1. Username: mifos
  2. Password: password
Clone this wiki locally