Skip to content

Commit a9eba5b

Browse files
Merge pull request #9086 from MicrosoftDocs/main
Auto Publish – main to live - 2026-04-01 01:00 UTC
2 parents fb16b2a + 7341d81 commit a9eba5b

1 file changed

Lines changed: 54 additions & 3 deletions

File tree

docs/repos/git/repository-settings.md

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ description: Learn how to configure a Git repository and its branches.
55
ms.assetid: 9336ed18-c239-4394-aa4c-64b6d01130f9
66
ms.service: azure-devops-repos
77
ms.topic: how-to
8-
ms.custom: cross-service, devx-track-azurecli
8+
ms.custom: cross-service, devx-track-azurecli, copilot-scenario-highlight
99
ai-usage: ai-assisted
1010
monikerRange: '<= azure-devops'
11-
ms.date: 08/08/2022
11+
ms.date: 03/26/2026
1212
ms.subservice: azure-devops-repos-git
1313
---
1414

1515
# Set Git repository settings and policies
1616

1717
[!INCLUDE [version-lt-eq-azure-devops](../../includes/version-lt-eq-azure-devops.md)]
1818

19-
[!INCLUDE [ai-assistance-callout](../../includes/ai-assistance-callout.md)]
19+
[!INCLUDE [ai-assistance-mcp-server-tip](../../includes/ai-assistance-mcp-server-tip.md)]
2020

2121
There are several ways to customize your Azure Repos Git repositories by using branch and repository settings and policies. This article discusses repository-level settings and policies.
2222

@@ -204,6 +204,17 @@ The following table summarizes the settings that you can enable or configure for
204204
:::column span="3":::
205205
Specify up to five more branches to participate in code search, which by default applies only to the default branch. Requires the [Code Search extension](https://marketplace.visualstudio.com/items?itemName=ms.vss-code-search) installed and enabled.
206206
:::row-end:::
207+
:::row:::
208+
:::column span="2":::
209+
[Include PR ID in commit message](#include-pr-id-in-commit-message)
210+
:::column-end:::
211+
:::column span="1":::
212+
On
213+
:::column-end:::
214+
:::column span="3":::
215+
Include the pull request ID in the commit message title for commits generated during PR completion. When disabled, PR completion commit messages don't include the PR ID prefix.
216+
:::column-end:::
217+
:::row-end:::
207218
::: moniker-end
208219

209220
::: moniker range="<=azure-devops"
@@ -860,6 +871,26 @@ Enabling this setting disables access to the repository, including builds and pu
860871
:::image type="content" source="media/repository-settings/disable-repository.png" alt-text="Screenshot that shows the Disable Repository setting.":::
861872
::: moniker-end
862873

874+
::: moniker range="azure-devops"
875+
876+
<a id="include-pr-id-in-commit-message"></a>
877+
878+
## Include PR ID in commit message setting
879+
880+
This repository setting controls whether the pull request (PR) ID is automatically included in the commit message title for commits generated during PR completion actions such as merge, squash, or rebase.
881+
882+
By default, this setting is enabled to preserve existing behavior. When enabled, commit messages generated during PR completion include the PR ID as a prefix in the commit message title. When disabled, the PR ID prefix is omitted from PR completion commit messages.
883+
884+
> [!NOTE]
885+
> This setting applies only to commits generated during PR completion. It doesn't affect manual commits. The setting only affects commits created after you change the setting.
886+
887+
To enable or disable the PR ID in commit messages:
888+
889+
1. Select **Project Settings** > **Repositories**, and then select a repository.
890+
1. On the **\<Repository name>** page, on the **Settings** tab, set **Include PR ID in the completion commit message title by default** to **On** or **Off**.
891+
892+
::: moniker-end
893+
863894
::: moniker range="<=azure-devops"
864895

865896
## Searchable branches setting
@@ -1195,6 +1226,26 @@ ID Name Is Blocking Is Enabled Repository Id
11951226

11961227
***
11971228

1229+
<a id="use-ai-assistance"></a>
1230+
1231+
## Use AI to manage Git repository settings
1232+
1233+
If you have the [Azure DevOps MCP Server](../../mcp-server/mcp-server-overview.md) configured, you can query and manage repository settings and policies using natural language prompts with your AI assistant.
1234+
1235+
| Task | Example prompt |
1236+
|------|----------------|
1237+
| List repositories | `List all Git repositories in the <project-name> project` |
1238+
| View repository details | `Show me the settings for the <repository-name> repository in <project-name>` |
1239+
| Check repository policies | `What policies are configured for the <repository-name> repository?` |
1240+
| List branch policies | `Show all branch policies on the main branch in the <repository-name> repository` |
1241+
| Check PR completion settings | `What merge types are allowed for pull requests in the <repository-name> repository?` |
1242+
| Review cross-repo policies | `List all cross-repository branch policies in the <project-name> project` |
1243+
| Check code search branches | `Which branches are configured for code search in the <repository-name> repository?` |
1244+
| Audit repository permissions | `Who has contribute permissions on the <repository-name> repository in <project-name>?` |
1245+
1246+
> [!TIP]
1247+
> If you're using Visual Studio Code, [agent mode](/visualstudio/ide/copilot-chat-context#agent-mode) is especially helpful for reviewing and managing repository settings and policies across multiple repositories.
1248+
11981249
## Related content
11991250

12001251
- [Improve code quality with branch policies](branch-policies.md)

0 commit comments

Comments
 (0)