In Git repository you can use branching models to define a branch
workflow for repositories. When you map your workflow to repository branches
with a branching model, admins can guide developers to name branches
consistently by configuring which branch types to make available. There are a
number of branch types available, and several branch types have default branch
naming prefixes (described below). You can also specify your own naming
convention for each branch type. A consistent naming convention makes it
easier to identify branches by type.
Branch types
Bitbucket Server comes with several types of branches that are frequently used
in software development. This section explains what each branch type is for,
and has the typical naming convention for the prefix for each branch type. The
prefix can be changed for each branch type.
Development branch
Usually the integration branch for feature work and is often the
default branch or a named branch. For pull request workflows, the
branch where new feature branches are targeted.
|
develop
|
Production branch
Used for deploying a release. Branches from, and merges back into,
the development branch. In a Gitflow-based workflow it is used to
prepare for a new production release.
|
master |
Feature branch
Used for specific feature work or improvements. Generally branch
from, and merge back into, the development branch using pull
requests.
|
feature/ |
Release branch
Used for release task and long-term maintenance versions. They
branch from, and merge back into, the development branch. Merging
into an older release branch can be configured to automatically
merge to newer release branches, as well as the development branch.
|
release/ |
Bugfix branch
Typically used to fix Release branches.
|
bugfix/ |
Hotfix branch
Used to quickly fix a Production branch without interrupting changes
in the development branch. In a Gitflow-based workflow, changes are
usually merged into the production and development branches.
|
hotfix/ |
Good to know:
-
New repositories will have the branching model enabled by default, and use
the default branch prefixes.
-
Enabled branch types can't have empty prefixes, have a 30 character limit,
and can't overlap (for example PROD and PRODUCT would overlap).
Comments
Post a Comment