ApexSQL Source Control
This article gives a list of frequently asked questions about branching and merging in ApexSQL Source Control.
Q: Is it possible to utilize branching regardless of the development model?
A: Yes, branching and merging can be used in the same way regardless of the development model.
Q: Is it possible to use a single branch as a source for creating multiple new branches?
A: Yes, it is possible. A single branch can be used as a source for more than one new branch.
Q: How can I find information about the currently active branch?
A: The information about the current branch is in the Action center tab, specifically in the Status bar section at the bottom (this applies to Subversion, Perforce and Team Foundation Server):
Besides this, for Git and Mercurial, the Active branch drop down list shows the branch that is set to active:
Q: Is it possible to choose a source branch that is not the current one when merging branches?
A: Yes, when merging branches, a source branch can be any existing branch regardless of the currently active one.
Q: Is it possible to select a branch outside the current repository as a source or a target when merging branches?
A: No, this is not possible. When dealing with branches, only branches from the existing repository are available.
Q: Is it possible to use branches created outside ApexSQL Source Control and SQL Server Management Studio?
A: Yes, it is possible. Whatever method is used to create a branch, such a branch can be utilized through ApexSQL Source Control.
Q: Is there a way to avoid relinking a database when switching between branches?
A: When switching between branches in Perforce, Subversion or Team Foundation Server, a database must be re-linked.
On other hand, when using Git or Mercurial there is no need to re-link a database to switch between branches.
Q: Is there a way to create a new branch from the Source control wizard, before a database is linked?
A: No, a new branch cannot be created before a database is linked to source control.
Q: Is there a way to change the source branch in the Create branch form?
A: No. In order to set another branch as a source branch, it has to be set as active branch using the Active branch drop-down list in the Action center tab for Git and Mercurial:
For Subversion, Team Foundation Server and Perforce, a database must be re-linked to the appropriate branch in order to set it as an active one.
Q: Is there a way to select a changeset in the Create branch dialog but to exclude any underlying changesets?
A: No. A changeset that is selected (highlighted) in the Create branch dialog, before creating a new branch, automatically includes any previous changesets committed to the branch that is specified as a source.
Q: Is there a way to include changesets committed to any other branch other than the source one?
A: No, when creating a new branch, a list of changesets includes only changesets committed to a source branch. Any other changesets will not be available, thus such changesets cannot be selected.
Q: Is there a way to delete a previously created branch?
A: Branches cannot be deleted within SQL Server Management Studio using ApexSQL Source Control.
In order to delete any branch, it has to be deleted directly on the source control repository. As an example, we have used a Git repository on bitbucket.org and to delete any branch (for example let’s delete Feature01 branch), list all branches:
Click the branch that should be deleted (we’ll choose Feature01) and use the Delete branch command:
A branch can be deleted using any client, in this case any Git client, by specifying the following command:
$ git branch -d <branch_name>
Applies on a Feature01 branch, the CLI command for deleting a branch will be:
$ git branch -d Feature01