Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 17, 2025

Changes

This PR updates .github/copilot-instructions.md to automatically use the instructions from the main branch when available, with the local file serving as a fallback. This eliminates the need to manually sync the file across all active branches.

What changed:

  1. Added a header directive that instructs Copilot to prefer instructions from main:

    Use the instructions from the main branch if available: @dotnet/sdk/files/.github/copilot-instructions.md
    
  2. Updated the content with the latest version from main branch, which includes additional guidance:

    • Instructions to commit changes before formatting them
    • Guidance on adding format commit SHAs to .git-blame-ignore-revs file
    • Instructions for using #if NET and #if NETFRAMEWORK preprocessor blocks

Benefits:

  • Automatic synchronization: All branches automatically use the most current instructions from main
  • Maintenance reduction: No need to manually update this file in every active branch
  • Reliability: Local fallback ensures Copilot still has instructions if main branch is unavailable

This approach ensures consistency across branches while significantly reducing maintenance overhead.

Original prompt

Update the contents of copilot-instructions.md with the contents that are in main: @dotnet/sdk/files/.github/copilot-instructions.md

Additionally, update the top of the file to tell copilot to use the instructions from main if available and use the below instructions as a fallback if not. That way we don't have to keep the file in sync in all active branches.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Update copilot-instructions.md with main contents Update copilot-instructions.md to reference main branch with fallback Oct 17, 2025
Copilot AI requested a review from marcpopMSFT October 17, 2025 18:39
Copilot finished work on behalf of marcpopMSFT October 17, 2025 18:39
@marcpopMSFT marcpopMSFT marked this pull request as ready for review October 17, 2025 20:51
@marcpopMSFT marcpopMSFT requested a review from baronfel October 17, 2025 20:51
@marcpopMSFT
Copy link
Member

trying to future proof this so we don't have to constantly update the older branches but also updating the older branch this once just in case.

@baronfel
Copy link
Member

This is a really interesting problem space. I hit similar with MSBuild when proposing a new diagnostic ID on the 17.14 branch - I had to make sure to tell copilot to check the matching diagnostic ids on the 'future version' branches that existed. We may need similar here in the SDK in the future - just another edge case for how multiple-releases interact with these kinds of tools.

@marcpopMSFT
Copy link
Member

/ba-g hitting the VS stable version issue.

@marcpopMSFT marcpopMSFT merged commit 9a2e4e9 into release/10.0.1xx Nov 13, 2025
25 of 28 checks passed
@marcpopMSFT marcpopMSFT deleted the copilot/update-copilot-instructions-md branch November 13, 2025 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants