vscode-copilot-release icon indicating copy to clipboard operation
vscode-copilot-release copied to clipboard

Copilot commit messages ignore language instructions and markdown guideline file (.copilot-commit-message-instructions.md)

Open MaxCHL opened this issue 8 months ago • 12 comments

Hello GitHub team,

I’m encountering an issue with GitHub Copilot’s commit message generation feature in Visual Studio Code (tested in both Stable and Insider builds).

Despite setting specific language instructions and providing a guideline file, Copilot always generates commit messages in English, ignoring the language preference and markdown formatting instructions.

Environment Details: • Editor: Visual Studio Code (Stable & Insider) • GitHub Copilot extension: Latest version • OS: macOS Sequoia 15.4.1 • Languages tested: English, Chinese (Traditional), Japanese

Settings Attempted: In settings.json, I added:

    "github.copilot.chat.commitMessageGeneration.instructions": [
        {
            "text": "# Use Conventional Commits 1.0.0 for commit messages."
        },
        {
            "text": "All records must be written in Traditional Chinese at all times."
        },
        {
            "file": ".copilot-commit-message-instructions.md"
        }
    ],

The file .copilot-commit-message-instructions.md exists in the project root, and contains a full markdown-formatted Conventional Commits guideline and a language preference.

Observations: • Regardless of either method (instructions in JSON or the .md file), Copilot always generates messages in English. • Language preference and guideline content are not reflected in the commit messages. • Behavior is consistent across different projects, languages, and system locales. • I suspect that this issue becomes more apparent when committing multiple files at once. In such cases, GitHub Copilot seems even less likely to respect the provided language and formatting guidelines.

MaxCHL avatar Apr 23 '25 05:04 MaxCHL

I encountered the same problem and am looking forward to having it fixed

Ador-able avatar Apr 23 '25 16:04 Ador-able

Sorry, that was my mistake—I’ve now updated it to reflect the correct issue state.

--

Update: When there are no staged changes in Git, clicking the AI icon in the Source Control panel consistently shows English output.

To resolve the staging issue, I ran git add ., followed by git --no-pager diff --cached | wc -c, which returned 16842.

After that, clicking the Source Control AI icon produced output in Chinese—but it was very concise. Also, the format did not follow the Conventional Commits 1.0.0 specification.

MaxCHL avatar Apr 24 '25 13:04 MaxCHL

I'm also facing a similar issue. When the number of files in staged area is large, copilot is not following instructions to generate commit message. As a workaround, I'm currently placing 3 files in staged area and generating commit message and it follows the instructions.

fingers10 avatar Apr 26 '25 16:04 fingers10

My instructions weren't being followed either. For Visual Studio Code, I changed the format to markdown (not JSON), and it started to work.

My instructions:

- Commit messages should be prefixed with the branch ticket identifier (format: DEV-#####).
## Example
* Git branch: `DEV-12345-auto-order-feature` 
* Commit message: "DEV-12345 Added feature...".

bigmountainstudio avatar Sep 04 '25 16:09 bigmountainstudio

My instructions weren't being followed either. For Visual Studio Code, I changed the format to markdown (not JSON), and it started to work.

My instructions:

- Commit messages should be prefixed with the branch ticket identifier (format: DEV-#####).
## Example
* Git branch: `DEV-12345-auto-order-feature` 
* Commit message: "DEV-12345 Added feature...".

My instructions were already in markdown format and just got this bug. It worked great last week, but now I tried it on a much larger commit scope.

hornta avatar Sep 10 '25 12:09 hornta

I'm also facing the same issue. In my case, I'm using the following instructions directly on the workspace setting.json and copilot is ignoring:

"github.copilot.chat.commitMessageGeneration.instructions": [
    {"text": "Use conventional commit message format."},
]

yuriishizawa avatar Sep 10 '25 13:09 yuriishizawa

I'm also facing a similar issue. When the number of files in staged area is large, copilot is not following instructions to generate commit message. As a workaround, I'm currently placing 3 files in staged area and generating commit message and it follows the instructions.

Yes,me too.

donywan avatar Sep 11 '25 03:09 donywan

Same here. It follows some rules, but definitely not exactly as I ask. Especially for the many package.json related changes in a monorepo.

dmythro avatar Oct 29 '25 08:10 dmythro

same here

latel avatar Oct 29 '25 09:10 latel

Same here. Hope this will be fixed. I found it extremely useful

rastorc3v avatar Nov 03 '25 12:11 rastorc3v

Same here. I see the same issue for AGENTS.md files too. With the "Open Chat" Mode the file is used and correctly applied but if i'm using the "Generate Commit Message"- Button it doesnt work as expected.

LuigiDC avatar Nov 05 '25 11:11 LuigiDC

I'm using a workspace for my development, and it finally works after updating the file path as mentioned issues #10772.

It appears that Copilot only recognizes configuration files located under a relative path (./.vscode/) rather than an absolute path. As a workaround, I had to create a symlink for each folder within the same workspace.

yichantsai avatar Nov 13 '25 07:11 yichantsai

Closing the issue based on the most recent comment.

lszomoru avatar Dec 09 '25 08:12 lszomoru

Closing the issue based on the most recent comment.

How does recent comment resolve the issue?

dmythro avatar Dec 09 '25 11:12 dmythro

It appears that Copilot only recognizes configuration files located under a relative path (./.vscode/) rather than an absolute path. As a workaround, I had to create a symlink for each folder within the same workspace.

@dmythro, are you using instructions that are in the .vscode directory that are not recognized?

lszomoru avatar Dec 09 '25 11:12 lszomoru