xxxxxxxxxx
// I perfer using rebase:
git switch my-feature-branch
git fetch
git rebase origin/my-target-branch
// Open the conflicting files,
// Find the conflict blocks and fix them
// continue the rebase:
git add -A
git commit -m "FIx merge conflicts"
// Up to this point, you can run git rebase --abort
git rebase --continue
// push (with safe force if needed) to feature
git push --force-with-lease origin my-feature-branch
This method is recommended by gitLab :)
// Step 1. Fetch and check out the branch for this merge request
git fetch origin
git checkout -b new-feature origin/new-feature
// Step 2. Review the changes locally
// Step 3. Merge the branch and fix any conflicts that come up
git checkout develop
git merge --no-ff new-feature
//Step 4. Push the result of the merge to GitLab
git push origin develop
// Tip: You can also checkout merge requests locally by following these guidelines.