Forum Discussion

harshadapalande's avatar
harshadapalande
Occasional Visitor
4 months ago

Merge Conflict Issue

Hi all, we are working with TestComplete integrated with Azure Devops. We are following the correct process of Git operations still we face merge conflict issue. Here's the scenario we faced:

  1. User 1 saved, committed the changes and pushed changes to the repository.
  2. Following to this User 2 saved, committed the changes and performed pull and during this operation faced merge conflict issue. 
  3. After this the user gets a pop-up window wherein there are options to pull the changes like "Yes to All", "No to All", "yes", "No".

Does anyone have any idea in spite of following the correct process why is merge conflict arising.

 

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    Merging is a price that is paid for the possibility to use non-blocking source code control systems. Merging never guarantees to be correct and/or conflict-less. Merging is a generic problem for any non-blocking source control system.

    So your best approach is to work out a process to minimize the chance to have source code conflict, commit often (even non-completed code may and must be committed with the condition that it will not be used in production until been completed) and notify colleagues after every commit to let them pull committed changes and thus minimize the chance of conflict.

     

    • Hassan_Ballan's avatar
      Hassan_Ballan
      Contributor

      To minimize conflicts, I suggest:

      1. gear towards short lived branches
      2. divide work by isolating areas to avoid multiple users changing same file
      3. when ready to deliver changes, users to perform a new pull as a first step before commit and push.