Normally the merge takes care of that. It sounds like you are getting a merge conflict, and instead of merging the changes, you are accepting one or the other project file.
Manage multiple branches in SQL Server database project using VS data tools.

Hi everyone,
is there any best practice to manage multiple branches of an SQL server database project.
Sample scenario:
- There is a main branch
- Developer A creates a branch A
- Developer B creates a branch B
- Developer A creates a pull request and merge let's say a new table into main.
- Developer B creates a pull request containing another new table.
The problem by the second pull request is the project file. File for different sql objects are not getting in conflict since every new table gets a dedicated file in the correspondent schema folder. From the other side the project file in Main points to the table created by user A but does not contain the table in the pull request and viceversa.
Until now we are overcoming this drawback merging the project file manually but I want to double check if there is a better way to proceed.
Any help will be appreciated.
Best regards,
Paul
3 answers
Sort by: Most helpful
-
-
CathyJi-MSFT 20,976 Reputation points Microsoft Vendor
2021-09-03T05:56:36.4+00:00 Hi @Paul Hernandez ,
Did you mean that branch strategies in source control system? If I misunderstood, please let me know.
Please check if below blog could help you.
-
Paul Hernandez 546 Reputation points
2021-09-03T13:52:59.147+00:00 Hi @CathyJi-MSFT and @Tom Phillips ,
thanks for the feedback.
Yes, I am getting a confilct while creating the second pull request.
It is not exactly about the branching strategy (which is behind this) but a technical solution to solve the PR conflicts.
I solved this problems manually.
Example confilct:
In this case, just delete the comment in the windows on the bottom and click on “Submit Merge”.
After that merge is applied and the conflict resolved:
This is find but I fix manually the conflicts, which could be error prone in large features with more changes and just wanted to know if there is a kind of magic that auto resolves this specific conflict with the project files.
Best regards,
Paul