July 9th, 2025
0 reactions

Customize GitHub Copilot in JetBrains with Custom Instructions

Hang Wang
Program Manager

Try GitHub Copilot Now

Try GitHub Copilot Now

Today, you can useCustom Instructions in JetBrains to speed up development while staying aligned with your team’s coding standards and personal preferences.

Blog poster250616 Custom Instructions for Copilot in JetBrains image

Whether you’re working on a solo project or part of a larger team, adhering to consistent coding standards is essential. Custom Instructions provide a mechanism to reinforce team coding guidelines or embed personal coding preferences.

Example: Make custom instructions for newly generated code

Make sure you have the latest version ofGitHub Copilot installed on you JetBrains IDE. Then, navigate to theGitHub Copilot settings to find theCustom Instructions section.

Go to theSettings page ofGitHub Copilot, and findCustom Instructions, in theCopilot Instructions part you can configure custom instructions either for thecurrent workspace or asglobal settings.

Screenshot 2025 07 10 at 12 09 45 image

Alternatively, you can create the instruction files manually:

  • Workspace-level instructions:.github/copilot-instructions.md (you may find the .github folder in your project root)
  • Global instructions:
    • macOS:/Users/your-username/.config/github-copilot/intellij/global-copilot-instructions.md
    • Windows:C:\Users\your-username\AppData\Local\github-copilot\intellij\global-copilot-instructions.md

In this example, I’m setting aworkspace-level instruction.

instruction image

Next, let’s create a new Java class namedQuicksort in the root folder, which implements the quicksort algorithm.

coding with rules image

As soon as the class is created, you’ll see the custom header automatically added at the top, just as specified in the Copilot’s custom instructions we configured earlier.

results image

Example: Customize git commit messages

You may also customize the git commit message based on you needs. Go to theSettings page ofGitHub Copilot, and find Custom Instructions, then you can configure git commit messages either for thecurrent workspace or asglobal settings.

Screenshot 2025 07 10 at 12 06 10 image

Alternatively, you can create the instruction files manually:

  • Workspace-level instructions:.github/git-commit-instructions.md (you may find the .github folder in your project root)
  • Global instructions:
    • macOS:/Users/your-username/.config/github-copilot/intellij/global-git-commit-instructions.md
    • Windows:C:\Users\your-username\AppData\Local\github-copilot\intellij\global-git-commit-instructions.md

git instruction image

Now expand theCommit tab in the side bar, and click the Copilot iconlogo image, You should see a commit message generated based on the instruction we just set.

place image

Learn More

You can find more custom instructions usage in the official doc.

Feedback

Your feedback drives improvements. Let us know what you think using the in-product feedback option, or share your thoughts in the following channels: JetBrains IDE Feedback.

Category
Share

Author

Hang Wang
Program Manager

I'm Hang Wang, a Product Manager at Microsoft specializing in developer experience. I began my journey at Microsoft as a Software Engineer, gaining deep insights into developers' needs and challenges. Now, I focus on AI-driven tools that enhance developer productivity.

0 comments

Be the first to start the discussion.

    Stay informed

    Get notified when new posts are published.
    Follow this blog