Demonstrating GIT Merge Conflicts in Oracle Visual Builder Studio

 


In this post, we will look into how merge conflicts are handled in Oracle Visual Builder Studio.


Below is the current structure of our GIT Repository that we created earlier. Click here to see how. 

Here we have two branches main and test, both having one file TestFile1.txt with the content as shown above.




Now we will create two new branches dev1 and dev2 with the base as the main branch so that both the branches will have the same content of TestFile1.txt. Click here to see how.


After this, we will switch to the dev1 branch in GitHub Desktop and will change the file, and push the changes.



Now, raise a merge request for dev1 -> main:

Once the merge request is completed we can pull the changes



This operation is shown below

Now let's perform a similar kind of operation for dev2 branch:



Now, let's raise a merge request for dev2 -> main:





Now, when we open the merge request it will clearly show that there's a merge conflict that we need to resolve then only we can merge the changes:

After clicking on Resolve Conflicts you will see the below screen. Click on Resolve 1 Conflict and choose any of the below options:

  • Use Our Version ("dev2") - Changes in dev2 will be saved
  • Use Their Version ("main") - No changes will be made to the TestFile1.txt thereby discarding dev2 changes



Here we will select 
Use Their Version ("main") and click Update Review Branch


Give the Message Summary and click the Merge button


Click on the Merge button again


In GitHub Desktop pull the changes


You will see that changes have been rolled back




Comments