Resolve PR Conflicts

 


When multiple people working on same file or changing same files in multiple branches can lead to PR conflicts. When you see a PR (Pull Request) conflict in azure repository you can follow below steps to get rid of it.

git checkout master 

git pull origin  

git checkout <branch_name> 

git rebase master 

Then the changes will display on VS code in Merge section. (Visual Studio Code is a better tool when merging conflicts, it displays code diferences clearly and easy to merge with the tool support buttons)

Do the necessary adjustment to avoid conflicts - Use VS code and IFS Developer studio for that. After merging make sure filles are deploying without any errors in IFS Developer Studio.  

After that stagged all changed files, you can use below command or use VS Code for that.

git add .

git commit -m 'Resolve conflicts 1' 

git rebase --continue 

To skip or abort rebase/ rebase stage we can use below commands 

git rebase --skip 

git rebase --abort 

If there are more rebase stages, we have to continue the process like above until all the rebase stages complete 

Again go to VS code and check the Merge section to solve conflicts in Rebase 2 stage 

Again stage all the changes and then commit 

After the commit again git rebase --continue to next stage of rebase 

After all the rebase stages complete it will move to your branch 

After that 

git push --force to push resolved conflicts to the remote branch or can use VS code options to push changes to remote repo. 

See the files section to verify all the changes applied correctly 

Now please check the overview of the PR.

Post a Comment

0 Comments