Skip to content

Commit 75e270f

Browse files
author
Jill Grant
authored
Merge pull request #13503 from ghogen/git-code-review
New feature: Git code review
2 parents ed0f68f + 44a39bf commit 75e270f

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

docs/version-control/git-make-commit.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,26 @@ Visual Studio also makes it easy to commit and sync with one click by using the
4040

4141
:::image type="content" source="media/vs-2022/git-file-version-compare.png" alt-text="The line-by-line comparison of file versions in Visual Studio 2022.":::
4242

43+
:::moniker range=">=vs-2022"
44+
4345
New in [**version 17.6**](/visualstudio/releases/2022/release-notes-v17.6): You can also reference an issue or a pull request by typing `#` or selecting the **#** button in the lower right side of the commit message text box. For more information, see the [Reference issues and pull requests](https://devblogs.microsoft.com/visualstudio/reference-github-issues-and-pull-requests-in-visual-studio/) blog post.
4446

45-
New in **version 17.12**: When you rename a file, you'll see a notification bar at the top of the **Git Changes** window informing you that a file was renamed, and prompting you to stage that change. This notification appears before you stage or commit anything. You might want to stage and commit the change before making other changes, in order to ensure that Git detects the change as a rename, not a deletion and addition of a new file.
47+
New in [**version 17.12**](/visualstudio/releases/2022/release-notes-v17.12): When you rename a file, you'll see a notification bar at the top of the **Git Changes** window informing you that a file was renamed, and prompting you to stage that change. This notification appears before you stage or commit anything. You might want to stage and commit the change before making other changes, in order to ensure that Git detects the change as a rename, not a deletion and addition of a new file.
48+
49+
New in **version 17.13**: With [GitHub Copilot](../ide/visual-studio-github-copilot-install-and-states.md) installed, you can have GitHub Copilot review your code changes before you commit them. To use this feature, make sure that **Tools** > **Options** > **Preview Features** > **Pull Request Comments** is enabled, and also enable **Tools** > **Options** > **GitHub** > **Copilot** > **Source Control Integration** > **Enable Git preview features**.
50+
51+
In the **Git Changes** window, click on the **Review changes with Copilot** button, which looks like a comment icon with a sparkle.
52+
53+
After a few moments, a link showing the number of code review comments appears in the **Git Changes** window that you can click on to view and navigate the comments. If no issues are detected, the message **Copilot did not comment on any files** appears.
54+
55+
![Screenshot showing Git Changes window with Review changes button.](./media/vs-2022/git-code-review-changes-button.png)
56+
57+
The code review feedback shows up as comments, which show brief summary of the potential problem, and you can decide to make a change, or dismiss the comment box by using the downward arrow button on the top right of the comment box.
58+
59+
![Screenshot showing GitHub code review comment.](./media/vs-2022/git-code-review-comment.png)
60+
61+
To remove all comments, use the **X** in the Git Changes window to close the Copilot code review link.
62+
:::moniker-end
4663

4764
## Revert, reset, or amend a commit
4865

14.3 KB
Loading
577 KB
Loading

0 commit comments

Comments
 (0)