Manage multiple branches in SQL Server database project using VS data tools.

Paul Hernandez 631 Reputation points Microsoft Employee

Hi everyone,

is there any best practice to manage multiple branches of an SQL server database project.

Sample scenario:

  1. There is a main branch
  2. Developer A creates a branch A
  3. Developer B creates a branch B
  4. Developer A creates a pull request and merge let's say a new table into main.
  5. 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,

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,082 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Tom Phillips 17,716 Reputation points

    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.

    0 comments No comments

  2. CathyJi-MSFT 21,111 Reputation points Microsoft Vendor

    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.

    Branching in Git with SQL Database Projects

    0 comments No comments

  3. Paul Hernandez 631 Reputation points Microsoft Employee

    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,