az-repos
Verified for current stable LTS
Az Repos Command: Add Merge Policy To Branch
Use for add merge policy to branch with Az Repos. Exact CLI syntax to add merge policy to branch using Az Repos.
When to use this: Use for add merge policy to branch with Az Repos.
Command Syntax
az repos policy merge-strategy create --repository-id <repository_id_in_repos_list> --branch <branch_name> --blocking --enabled --allow-no-fast-forward false --allow-rebase true --allow-rebase-merge true --allow-squash true az repos policy merge-strategy create --repository-id <repository_id_in_repos_list> --branch <branch_name> --blocking --enabled --allow-no-fast-forward false --allow-rebase true --allow-rebase-merge true --allow-squash true Command Breakdown
--repository-id- Command Option
- Tool-specific option used by this command invocation.
--branch- Command Option
- Tool-specific option used by this command invocation.
--blocking- Command Option
- Tool-specific option used by this command invocation.
--enabled- Command Option
- Tool-specific option used by this command invocation.
--allow-no-fast-forward- Command Option
- Tool-specific option used by this command invocation.
--allow-rebase- Command Option
- Tool-specific option used by this command invocation.
--allow-rebase-merge- Command Option
- Tool-specific option used by this command invocation.
--allow-squash- Command Option
- Tool-specific option used by this command invocation.
FAQ
Purpose: Exact syntax to add merge policy to branch using Az Repos.
Test path: Replace placeholders and run destructive commands in a disposable workspace first.
Flag behavior: Tool version, platform, and shell can change behavior.
Improve This Command
Suggest a correction, safer default, or version-specific note for this entry.
Related Operations
Az Repos Command: List Repos
az repos list -p <project_name> Az Repos Command: Add Merge Policy az repos policy merge-strategy create --repository-id <repository_id_in_repos_list> --branch <branch_name> --blocking --enabled --allow-no-fast-forward false --allow-rebase true --allow-rebase-merge true --allow-squash true Az Repos Command: Add Build Validation az repos policy build create --repository-id <repository_id> --build-definition-id <build_pipeline_id> --branch main --blocking --enabled --queue-on-source-update-only true --display-name <name> --valid-duration <minutes> Az Repos Command: List Pull Requests az repos pr list -p <project_name> -r <repository_name> --status active Az Repos Command: Add Merge Strategy Policy az repos policy merge-strategy create --repository-id <repository_id_in_repos_list> --branch <branch_name> --blocking --enabled --allow-no-fast-forward false --allow-rebase true --allow-rebase-merge true --allow-squash true