Skip to content

Commit aa2db91

Browse files
Merge pull request #14340 from MicrosoftDocs/main
Auto Publish – main to live - 2025-09-22 23:00 UTC
2 parents 0988818 + 19f9984 commit aa2db91

File tree

7 files changed

+358
-324
lines changed

7 files changed

+358
-324
lines changed

docs/ide/copilot-agent-mode.md

Lines changed: 70 additions & 58 deletions
Large diffs are not rendered by default.

docs/ide/copilot-edits.md

Lines changed: 43 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: 'GitHub Copilot Edits in Visual Studio'
2+
title: GitHub Copilot Edits in Visual Studio
33
description: Use GitHub Copilot Edits to iterate quickly on code changes across multiple files in Visual Studio version 17.13 and later.
44
ms.date: 7/31/2025
55
ms.update-cycle: 180-days
@@ -13,91 +13,94 @@ monikerRange: '>= vs-2022'
1313
---
1414
# What is GitHub Copilot Edits?
1515

16-
GitHub Copilot Edits, a feature of GitHub Copilot Chat, is designed to help iterating across multiple files more efficient. This feature is available with the release of Visual Studio 2022 version 17.13.
16+
GitHub Copilot Edits, a feature of GitHub Copilot Chat, is designed to help you iterate across multiple files more efficiently. This feature is available with the release of Visual Studio 2022 version 17.13.
17+
18+
Copilot Edits combines the conversational flow of chat and an inline review experience. It offers the following benefits:
1719

18-
Edits combines the conversational flow of chat and an inline review experience, offering the following benefits:
1920
- **Preview with clarity**: Know exactly what's being modified with a summary of the affected files and the proposed changes.
20-
- **Review with flow**: View code diffs inline, directly in your editor. Use the `TAB` key to accept or the `Alt+Del` key to reject individual changes, or apply/dismiss all at once.
21-
- **Iterate with confidence**: Use checkpoints to revisit earlier iterations of a code file or try an alternative approach anytime for new ideas.
21+
- **Review with flow**: View code diffs inline, directly in your editor. Use the <kbd>Tab</kbd> key to accept or <kbd>Alt</kbd>+<kbd>Delete</kbd> to reject individual changes, or apply/dismiss all at once.
22+
- **Iterate with confidence**: Use checkpoints to revisit earlier iterations of a code file, or try an alternative approach anytime for new ideas.
2223

2324
## Prerequisites
24-
+ [Visual Studio 2022 version 17.13](/visualstudio/releases/2022/release-history) and later offer Copilot Edits.
25-
+ [Sign in to Visual Studio using a GitHub account](work-with-github-accounts.md) with [Copilot access](https://docs.github.com/en/copilot/about-github-copilot/what-is-github-copilot#getting-access-to-copilot). <br/>
26-
+ You can use [GitHub Copilot for Free](copilot-free-plan.md). Sign up and leverage AI to code faster and more efficiently.
2725

28-
## When to use Copilot Edits vs. Copilot Chat
26+
- Install [Visual Studio 2022 version 17.13](/visualstudio/releases/2022/release-history) or later.
27+
- [Sign in to Visual Studio by using a GitHub account](work-with-github-accounts.md) with [Copilot access](https://docs.github.com/en/copilot/about-github-copilot/what-is-github-copilot#getting-access-to-copilot).
2928

29+
You can use [GitHub Copilot for free](copilot-free-plan.md). Sign up and use AI to code faster and more efficiently.
30+
31+
## When to use Copilot Edits vs. Copilot Chat
3032

3133
| Functionality | Copilot Chat | Copilot Edits |
3234
| ------------- | ------------- | ------------- |
33-
| Primary use case | **General purpose** conversational interface for understanding programming concepts, asking questions about code, and generating code. | **Focused multi-file editing** interface with code review, in-file preview, and rollback experience to make iterating on code across multiple files easier. |
34-
| Previewing proposed code | **Manually apply** each code block to each file in your solution to evaluate code-diff. | **Automatically applies** proposed code diff in each code file, making comprehension of the proposed changes easier.|
35-
| Code review experience | Accept or reject a **file worth of changes** at once. | Accept or reject **individual chunks of code** within a file. |
36-
| Versioning | Can use existing version control. | Adds a **rollback experience** to reset edited files to a previous state. Tracks all changes - proposed, accepted, dismissed, and manual edits made to the file. These checkpoints are retained until the user closes Visual Studio. |
35+
| Primary use case | General-purpose conversational interface for understanding programming concepts, asking questions about code, and generating code. | Focused multiple-file editing interface with code review, in-file preview, and rollback experience to make iterating on code across multiple files easier. |
36+
| Previewing proposed code | Manually apply each code block to each file in your solution to evaluate a code diff. | Automatically apply a proposed code diff in each code file, which makes comprehension of the proposed changes easier.|
37+
| Code review experience | Accept or reject a file's worth of changes at once. | Accept or reject individual chunks of code within a file. |
38+
| Versioning | Can use existing version control. | Adds a rollback experience to reset edited files to a previous state. Tracks all changes (proposed, accepted, dismissed, and manual edits) made to the file. These checkpoints remain until you close Visual Studio. |
3739

38-
## Using Copilot Edits
40+
## Activities in Copilot Edits
3941

40-
### Start an Edits thread
42+
### Start a Copilot Edits thread
4143

42-
:::image type="content" source="media/vs-2022/copilot-edits/getting-started-with-edits.gif" alt-text="Animated screenshot that shows starting a Copilot Edits thread and getting a response." lightbox="media/vs-2022/copilot-edits/getting-started-with-edits.gif":::
44+
1. Select **View** > **GitHub Copilot Chat** to open GitHub Copilot Chat. You can also open it from the GitHub Copilot status icon.
4345

44-
1. Select **View** > **GitHub Copilot Chat** to launch GitHub Copilot Chat. You can also launch it from the GitHub Copilot status icon.
45-
2. Select **Create new Edit session** to create a new Edits thread.
46-
3. Enter a chat prompt using natural language about the specific edit you want to make. To help Copilot Edits provide better code suggestions, you can also add relevant context to your prompt. [Reference context](copilot-chat-context-references.md#reference-context) by typing the `#` commands to refer to a file, your solution, errors, or a symbol specifically or [attach images](copilot-chat-context-references.md#attach-images) to provide additional context.
46+
2. Select **Create new Edit session**.
47+
48+
3. Enter a chat prompt, by using natural language, about the specific edit that you want to make.
49+
50+
To help Copilot Edits provide better code suggestions, you can also add relevant context to your prompt. [Reference context](copilot-chat-context-references.md) by typing the `#` commands to refer to a file, your solution, errors, or a symbol specifically. Or [attach images](copilot-chat-context-references.md#attach-images) to provide additional context.
51+
52+
:::image type="content" source="media/vs-2022/copilot-edits/getting-started-with-edits.gif" alt-text="Animated screenshot that shows starting a Copilot Edits thread and getting a response." lightbox="media/vs-2022/copilot-edits/getting-started-with-edits.gif":::
4753

4854
> [!TIP]
49-
> We suggest you ask for one commits worth of changes at a time. The more you can break down a problem, the better the result.
55+
> We suggest that you ask for one commit's worth of changes at a time. The more you can break down a problem, the better the result.
5056
5157
### Accept or discard edits
5258

53-
After Copilot Edits proposes a code iteration, you can preview these suggestions in your code files. You can then **Accept** to commit the proposed changes.
59+
After Copilot Edits proposes a code iteration, you can preview these suggestions in your code files. You can then accept the proposed changes to commit them.
5460

5561
#### Review each proposed change
5662

57-
:::image type="content" source="media/vs-2022/copilot-edits/accept-by-chunk.gif" alt-text="Animated screenshot that shows applying edits to file and accepting by chunk." lightbox="media/vs-2022/copilot-edits/accept-by-chunk.gif":::
63+
1. Select a file name. The file opens, and proposed changes appear as a diff in the code editor.
5864

59-
+ Start by clicking on a filename.
60-
+ The file opens and proposed changes are displayed as a diff in the code editor.
65+
1. Use the <kbd>Tab</kbd> key to accept a proposal, <kbd>Alt</kbd>+<kbd>Delete</kbd> to reject a proposal, or <kbd>F8</kbd> to go to the next proposal.
6166

62-
+ Use `TAB` to accept a proposal, `Alt+Del` to reject a proposal, or `F8` to go to the next proposal.
67+
If you accept or reject a proposal, the cursor automatically moves to the next proposal.
6368

64-
+ If you accept or reject a proposal, the cursor will automatically move to the next proposal.
69+
:::image type="content" source="media/vs-2022/copilot-edits/accept-by-chunk.gif" alt-text="Animated screenshot that shows applying edits to a file and accepting by chunk." lightbox="media/vs-2022/copilot-edits/accept-by-chunk.gif":::
6570

6671
#### Accept all proposed changes in a file
6772

68-
:::image type="content" source="media/vs-2022/copilot-edits/accept-file.gif" alt-text="Animated screenshot that shows accepting edits to a specific file." lightbox="media/vs-2022/copilot-edits/accept-file.gif":::
69-
73+
Select the checkbox next to a file name to accept all proposed changes that are specific to a file.
7074

71-
Click the checkbox next to a filename to accept all proposed changes specific to a file.
75+
:::image type="content" source="media/vs-2022/copilot-edits/accept-file.gif" alt-text="Animated screenshot that shows accepting edits to a specific file." lightbox="media/vs-2022/copilot-edits/accept-file.gif":::
7276

7377
#### Accept all proposed changes in all files
7478

75-
:::image type="content" source="media/vs-2022/copilot-edits/accept-all.gif" alt-text="Animated screenshot that shows accepting all edits on all files." lightbox="media/vs-2022/copilot-edits/accept-all.gif":::
79+
Select **Accept all** to accept the proposed code changes across all files where changes are available. Files that have proposed changes are bold.
7680

77-
Select **Accept all** to accept the proposed code changes across all files where changes are available. Files with proposed changes are bolded.
81+
:::image type="content" source="media/vs-2022/copilot-edits/accept-all.gif" alt-text="Animated screenshot that shows accepting all edits on all files." lightbox="media/vs-2022/copilot-edits/accept-all.gif":::
7882

7983
### Revert edits
8084

8185
#### Revert to the original state
8286

83-
:::image type="content" source="media/vs-2022/copilot-edits/reset-iteration.png" alt-text="Screenshot that shows reverting file to the original state before any edits." lightbox="media/vs-2022/copilot-edits/reset-iteration.png":::
87+
While you review file changes, you might accept or reject a code proposal that you didn't mean to. If so, select **Reset changes** to reset the listed files to their state before the iteration was generated.
8488

85-
While reviewing file changes, if you accept or reject a code proposal you didn't mean to, select **Reset changes** to reset the listed files to their state before the iteration was generated.
89+
:::image type="content" source="media/vs-2022/copilot-edits/reset-iteration.png" alt-text="Screenshot that shows reverting a file to the original state, before any edits." lightbox="media/vs-2022/copilot-edits/reset-iteration.png":::
8690

87-
Reset changes also resets any manual changes made to the files.
88-
A popup dialog confirms the action before reverting file states
91+
**Reset changes** also resets any manual changes that you made to the files.
92+
A popup dialog confirms the action before reverting the file states.
8993

9094
### Revert to a previous iteration
9195

92-
:::image type="content" source="media/vs-2022/copilot-edits/reset-to-previous-iteration.png" alt-text="Screenshot that shows reverting file to a previous iteration." lightbox="media/vs-2022/copilot-edits/reset-to-previous-iteration.png":::
93-
94-
95-
At any time, you can select the **Reset to Iteration** on a previous iteration to reset all proposed and manual changes made to the listed files.
96+
At any time, you can select **Reset to Iteration** on a previous iteration to reset all proposed and manual changes made to the listed files.
9697
A popup dialog confirms the action before reverting file states.
9798

99+
:::image type="content" source="media/vs-2022/copilot-edits/reset-to-previous-iteration.png" alt-text="Screenshot that shows reverting a file to a previous iteration." lightbox="media/vs-2022/copilot-edits/reset-to-previous-iteration.png":::
100+
98101
## Related content
99102

100103
- [Install and manage GitHub Copilot in Visual Studio](visual-studio-github-copilot-install-and-states.md)
101104
- [GitHub Copilot experience for Visual Studio](visual-studio-github-copilot-extension.md)
102105
- [GitHub Copilot Chat experience for Visual Studio](visual-studio-github-copilot-chat.md)
103-
- [About GitHub Copilot Free](https://aka.ms/ghdocscopilotfreepage)
106+
- [GitHub Copilot Free](https://aka.ms/ghdocscopilotfreepage)

0 commit comments

Comments
 (0)