dbForge Source Control allows three ways of merging branches.
This approach is generally recommended for complex merges or merges with conflicts - for instance, if the same object has undergone changes both in your branch and main branch. In this case, the changes in your branch can be merged into main branch via a source control system. You only need to make sure that the references between your objects have remained intact after merging.
You can also merge branches via dbForge Source Control:
1. Go to Source Control and make sure there is a database linked to the required branch in your repo folder.
2. Get the latest version and commit your changes, if any.
3. Unlink the database from your branch.
4. Relink the database to main branch.
5. In Object Explorer, right-click a linked database that you need to update. On the shortcut menu, point to Source Control and click Commit.
6. Wait until the refresh is complete and Source Control Manager opens, showing the changes to your branch.
7. If there are conflicts, select the required way to resolve your conflict:
8. Click Commit. The Commit dialog box opens, showing the stages of the commit operation. When all the stages are completed, click OK to close the dialog box.
If there are no conflicts between your branch and main branch, you can perform merging via dbForge Schema Compare:
1. Go to Source Control and make sure there is a database linked to main branch.
2. Use your source control system to create a local copy of the latest version of your branch.
3. Go to dbForge Schema Compare and create a new project. Set the local copy of your branch as Source. Then set the database linked to main branch as Target (refer to Setting data sources for details).
4. Compare your data sources, check the differences, and deploy them from Source to Target (refer to Deploying schema changes for details).
5. Go back to dbForge Source Control. In Object Explorer, right-click a linked database that you need to update. On the shortcut menu, point to Source Control and click Commit.
6. Wait until the refresh is complete and Source Control Manager opens.
7. Click Commit. The Commit dialog opens, showing the stages of the commit operation. When all the stages are completed, click OK to close the dialog box.