The use of * wildcard matches branches and extracts the branch name to be displayed in the TeamCity interface (also known as logical branch name):
or a Git VCS root, +:refs/heads/* will match
refs/heads/feature1 branch, but in the TeamCity interface you'll see
feature1 only as a branch name.
A logical branch name is a branch name shown in the user interface for the builds and on build configuration level. A logical branch name can be a part of the full VCS branch name. It is calculated by applying a branch specification to the branch name from the version control.
then the part matched by * (e.g.
master ) is a logical branch name.
For the default branch,
<default> can be used, e.g.:
If the branch specification pattern uses parentheses, the logical name then is made up of the part of the name within the parentheses; e.g. the branch specification
+:refs/heads/(v8.1/*) will give you to see the
v8.1/feature1 logical name displayed in the UI for the VCS branch
refs/heads/v8.1/feature1, use this:
Builds from branches are easily recognizable in the TeamCity UI, because they are marked with a special label:
You can also filter history by a branch name if you're interested in a particular branch.
TeamCity assigns a branch label to the builds from the default branch too.
If a build configuration with branches has snapshot dependencies on other build configurations with branches, then when a build in a branch is triggered, the other builds in the chain will also get the branch associated, if the branches in the VCS roots of the builds have the same logical name and this branch is not excluded by the branch specification. The VCS roots of the builds can point to different repositories, but the logical branch name must be the same.
The VCS trigger groups branches from several VCS roots by logical branch names. When some root does not have a branch from the other root, its default branch is used. For example, you have 2 VCS roots, both have the default branch
refs/heads/master, the first root has the branch specification
refs/heads/7.1/* and changes in branches
refs/heads/7.1/feature2, the second root has the specification
refs/heads/devel/* and changes in branch
refs/heads/devel/feature1. In this case VCS trigger runs 3 builds with revisions from following branches combinations:
Manual branch merging