devops stage branch add

Add a source code repository branch to a pipeline stage.

By default, the branch must exist in the repository. Use –create-vcs-branch to create a branch if it doesn’t exist.

Each pipeline stage supports only one branch. Adding a branch replaces any existing branch linked to the pipeline stage.

Flag Name (Long)Flag Name (Short)Description
‑‑api‑versionN/AType: Value

Override the api version used for api requests made by this command
‑‑branch‑name‑bType: Value
Required

Name of the repository branch to assign to the stage.
‑‑create‑vcs‑branchN/AType: Boolean

Create the branch in the remote repository if it doesn’t already exist.
‑‑flags‑dirN/AType: Value

Import flag values from a directory.
‑‑jsonN/AType: Boolean

Format output as json.
‑‑pipeline‑idN/AType: Value
Required

ID of the pipeline that contains the stage.
‑‑stage‑idN/AType: Value
Required

ID of the pipeline stage to associate the branch with.
‑‑target‑org‑oType: Value
Required

Username or alias of the target org. Not required if the target-org configuration variable is already set.

Add an existing branch to a stage:

Create and add a branch to a pipeline stage: