Skip to content

Repo sync for protected CLA branch #7672

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 62 commits into from
Feb 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
5845b7a
Merge pull request #9054 from MicrosoftDocs/cxwtool-14856
ghogen Nov 16, 2021
3bd53d9
Merge branch 'master' into cxwtool-7156
cxwtool Nov 20, 2021
acff18e
Merge pull request #9087 from MicrosoftDocs/cxwtool-7156
ghogen Nov 22, 2021
4718e99
Merge branch 'master' into cxwtool-19206
cxwtool Nov 23, 2021
c82dbf9
Merge pull request #9092 from MicrosoftDocs/cxwtool-19206
ghogen Nov 23, 2021
a4b09df
Merge branch 'master' into cxwtool-14719
cxwtool Nov 25, 2021
cf28d21
Merge branch 'master' into cxwtool-3151
cxwtool Nov 27, 2021
a6f15c3
Merge pull request #9114 from MicrosoftDocs/cxwtool-14719
ghogen Nov 29, 2021
24a0f00
Merge pull request #9118 from MicrosoftDocs/cxwtool-3151
ghogen Nov 29, 2021
1a876ce
Merge branch 'master' into cxwtool-28744
cxwtool Nov 30, 2021
23813a9
Merge pull request #9127 from MicrosoftDocs/cxwtool-28744
ghogen Nov 30, 2021
d0755ef
Add Command Line arguments for Developer Shells
trippwill Dec 8, 2021
f5a9cff
Adjust path in powershell example
trippwill Dec 8, 2021
287271c
Merge pull request #9183 from trippwill/release-17.1
v-ccolin Dec 8, 2021
9a8eb73
Merge branch 'main' into cxwtool-24479
cxwtool Dec 9, 2021
037ee44
Merge pull request #9190 from MicrosoftDocs/cxwtool-24479
ghogen Dec 9, 2021
a9c354e
Merge branch 'main' into cxwtool-7605
cxwtool Dec 14, 2021
0638660
Merge pull request #9209 from MicrosoftDocs/cxwtool-7605
ghogen Dec 14, 2021
957317c
Merge branch 'main' into cxwtool-10787
cxwtool Dec 21, 2021
6faf5ea
Merge pull request #9243 from MicrosoftDocs/cxwtool-10787
ghogen Dec 21, 2021
c6ad8b8
Merge branch 'main' into cxwtool-29395
cxwtool Jan 1, 2022
977a9ce
Merge pull request #9280 from MicrosoftDocs/cxwtool-29395
ghogen Jan 3, 2022
6ec1c7e
Merge branch 'main' into cxwtool-9207
cxwtool Jan 4, 2022
ee7b770
Merge pull request #9289 from MicrosoftDocs/cxwtool-9207
ghogen Jan 4, 2022
4429b44
Merge branch 'main' into cxwtool-6036
cxwtool Jan 6, 2022
ed8dafe
Merge pull request #9302 from MicrosoftDocs/cxwtool-6036
ghogen Jan 6, 2022
5710dbe
Merge branch 'main' into cxwtool-11236
cxwtool Jan 11, 2022
c5fae5d
Merge pull request #9314 from MicrosoftDocs/cxwtool-11236
ghogen Jan 11, 2022
0eea59f
Merge branch 'main' into cxwtool-16579
cxwtool Jan 13, 2022
498a154
Merge pull request #9339 from MicrosoftDocs/cxwtool-16579
ghogen Jan 13, 2022
d07615a
Merge branch 'main' into cxwtool-2763
cxwtool Jan 15, 2022
b92cb91
Merge pull request #9353 from MicrosoftDocs/cxwtool-2763
ghogen Jan 18, 2022
6e80844
Merge branch 'main' into cxwtool-9669
cxwtool Jan 22, 2022
a86d912
Merge pull request #9396 from MicrosoftDocs/cxwtool-9669
ghogen Jan 24, 2022
f64839b
Merge branch 'main' into cxwtool-25722
cxwtool Jan 27, 2022
e178b4f
Merge pull request #9413 from MicrosoftDocs/cxwtool-25722
ghogen Jan 27, 2022
fdee777
Merge branch 'main' into cxwtool-5390
cxwtool Feb 1, 2022
bc487d4
Merge pull request #9441 from MicrosoftDocs/cxwtool-5390
ghogen Feb 1, 2022
31e4b04
Compare branches content
Taysser-Gherfal Feb 2, 2022
3db3a5c
Checkout commits content
Taysser-Gherfal Feb 2, 2022
4c2ccb4
Merge branch 'main' into cxwtool-29532
cxwtool Feb 3, 2022
1f34fcf
Merge pull request #9470 from MicrosoftDocs/cxwtool-29532
ghogen Feb 3, 2022
9a9e1d5
Merge branch 'main' into cxwtool-30307
cxwtool Feb 5, 2022
4f03853
Merge pull request #9496 from MicrosoftDocs/cxwtool-30307
ghogen Feb 5, 2022
788d8c0
Adding search terms to catch "compare branches"
j-martens Feb 7, 2022
616b780
Merge branch 'release-17.1' into tagherfa-GitTooling-17.1-Updates
j-martens Feb 7, 2022
89578db
Merge branch 'main' into cxwtool-3374
cxwtool Feb 8, 2022
f6e07a0
Merge branch 'main' into cxwtool-11839
cxwtool Feb 10, 2022
8858f70
Merge pull request #9516 from MicrosoftDocs/cxwtool-3374
ghogen Feb 10, 2022
031d6fc
Merge pull request #9531 from MicrosoftDocs/cxwtool-11839
ghogen Feb 10, 2022
81c9e28
Merge branch 'main' into cxwtool-29245
cxwtool Feb 12, 2022
db41e1c
Merge pull request #9550 from MicrosoftDocs/cxwtool-29245
ghogen Feb 12, 2022
9496aed
Merge branch 'main' into cxwtool-17991
cxwtool Feb 15, 2022
cd56576
Merge pull request #9557 from MicrosoftDocs/cxwtool-17991
ghogen Feb 15, 2022
7591357
revise Updated For statement to 17.1
TerryGLee Feb 15, 2022
f0e4e92
minor edit
TerryGLee Feb 15, 2022
9178d7f
Merge pull request #9561 from TerryGLee/tglee-whatsnew17.1
PRMerger12 Feb 15, 2022
2dc1687
Merge branch 'release-17.1' into tagherfa-GitTooling-17.1-Updates
ghogen Feb 15, 2022
73d485c
Merge pull request #9468 from Taysser-Gherfal/tagherfa-GitTooling-17.…
ghogen Feb 15, 2022
cc69727
Merge pull request #9563 from MicrosoftDocs/release-17.1
ghogen Feb 15, 2022
b5bde33
Merge pull request #9564 from MicrosoftDocs/main
ghogen Feb 15, 2022
f2730f3
Merging changes synced from https://github.com/MicrosoftDocs/visualst…
ghogen Feb 15, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions docs/ide/reference/command-prompt-powershell.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,65 @@ By default, the Developer PowerShell that launches is configured for the Visual
> [!TIP]
> The [execution policy](/powershell/module/microsoft.powershell.core/about/about_execution_policies) must be set in order for the cmdlet to run.
The `Launch-VsDevShell.ps1` script works by locating the `Microsoft.VisualStudio.DevShell.dll` PowerShell module in the Visual Studio installation path, loading it, and then invoking the `Enter-VsDevShell` cmdlet. Installed shortcuts, like those in the Start Menu, load the module and invoke the cmdlet directly. `Launch-VsDevShell.ps1` is the recommended way to initialize Developer PowerShell interactively or for scripting build automation.

## Command line arguments

### Target Architecture and Host Architecture

For build tools -- like the C++ compiler -- that create outputs targeting specific CPU architectures the developer shells can be configured using the appropriate command line argument. The architecture of the build tool binaries can also be configured using command line arguments. This is useful when the build machine is a different architecture than the target architecture.

> [!TIP]
> Beginning with Visual Studio 2022, `msbuild` will default to a 64-bit msbuild.exe binary, regardless of the Host Architecture.
|Shell|Argument|
|--|--|
|Developer Command Prompt|-arch=<Target Architecture>|
|Developer Command Prompt|-host_arch=<Host Architecture>|
|Developer PowerShell|-Arch <Target Architecture>|
|Developer PowerShell|-HostArch <Host Architecture>|

Developer PowerShell arguments -Arch and -HostArch are only available beginning with Visual Studio 2022 Update 1.

The following is a list of which architectures are supported, and whether they can be used for the Target Architecture or Host Architecture arguments.

|Architecture|Target Architecture|Host Architecture|
|--|--|--|
|x86|Default|Default|
|amd64|Yes|Yes|
|arm|Yes|No|
|arm64|Yes|No|

> [!TIP]
> If only Target Architecure is set, the shells will attempt to make the Host Architecture match. This can result in errors when setting only the Target Architecture to a value not also supported by Host Architecture.
#### Examples

Start Developer Command Prompt for Visual Studio 2019 Community Edition on a 64-bit machine, creating build outputs that target 64-bit:
```cmd
"%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat" -arch=amd64
```

Start Developer Command Prompt for Visual Studio 2019 Community Edition on a 64-bit machine, creating build outputs that target arm:
```cmd
"%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat" -arch=arm -host_arch=amd64
```

Start Developer PowerShell for Visual Studio 2022 Update 1 Community Edition on 64-bit machine, creating build outputs that target arm64:
```powershell
& 'C:\Program Files (x86)\Microsoft Visual Studio\2022\Community\Common7\Tools\Launch-VsDevShell.ps1' -Arch arm64 -HostArch amd64
```

### SkipAutomaticLocation

For Developer PowerShell, the starting directory of the shell is the Visual Studio Project Location. This will override any other paths, such as working directory. This behavior can be turned off using the
command line argument `-SkipAutomaticLocation`. This is useful if, for example, you want the shell to stay in the current directory after initialization.

The Project Location can be adjusted in Tools -> Options -> Projects & Solutions -> Project Location.

> [!TIP]
> The command line arguments `-Arch`, `-HostArch`, and `-SkipAutomaticLocation` are supported by both the `Launch-VsDevShell.ps1` script and the `Enter-VsDevShell` cmdlet.
## See also

- [Windows Terminal](/windows/terminal/)
Expand Down
6 changes: 3 additions & 3 deletions docs/ide/whats-new-visual-studio-2022.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "What's new in Visual Studio 2022"
titleSuffix: ""
description: "Learn about the new features in Visual Studio 2022."
ms.date: 01/26/2022
ms.date: 02/15/2022
helpviewer_keywords:
- "Visual Studio, what's new"
- "what's new [Visual Studio]"
Expand All @@ -17,15 +17,15 @@ ms.workload:
---
# What's new in Visual Studio 2022

**Updated for the 17.0 GA (General Availability) release.** See [full release notes](/visualstudio/releases/2022/release-notes) | View [product roadmap](/visualstudio/productinfo/vs-roadmap/)
**Updated for the 17.1 release.** See [full release notes](/visualstudio/releases/2022/release-notes) | View [product roadmap](/visualstudio/productinfo/vs-roadmap/)

>[!div class="button"]
>[Download Visual Studio 2022](https://visualstudio.microsoft.com/downloads/)

With [Visual Studio 2022](https://visualstudio.microsoft.com/vs/), you'll always get the best-in-class tools and services available for any developer, any app, and any platform. Whether you're using Visual Studio for the first time or you've been using it for years, there's a lot to like in our newest version!

> [!TIP]
> Check out the [**Visual Studio 2022 launch event**](https://www.youtube.com/watch?v=f8jXO946eDw) on our [YouTube channel](https://www.youtube.com/visualstudio). You can also catch it on our [Twitch channel](https://www.twitch.tv/visualstudio), too.
> Check out the [**Visual Studio 2022 GA launch event**](https://www.youtube.com/watch?v=f8jXO946eDw) on our [YouTube channel](https://www.youtube.com/visualstudio). You can also catch it on our [Twitch channel](https://www.twitch.tv/visualstudio), too.

## Performance improvements

Expand Down
42 changes: 38 additions & 4 deletions docs/version-control/git-browse-repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ ms.manager: jmartens
ms.prod: visual-studio-windows
ms.technology: vs-ide-general
---
# Browse Git repositories and compare branches in Visual Studio

# Browse Git repos & compare commits in Visual Studio

The **Git Changes** window provides a seamless way to interact with Git while coding without having to switch away from your code. But there are times when it makes more sense to focus on your Git repository. For example, you might need to get a good picture of what your team has been working on or maybe compare two commits to investigate a bug.
The **Git Changes** window provides a seamless way to interact with Git while coding without having to switch away from your code. But there are times when it makes more sense to focus on your Git repository. For example, you might need to get a good picture of what your team has been working on or maybe [compare two commits](#compare-commits) to investigate a bug.

You can work remotely with the Git provider of your choice, such as GitHub or Azure DevOps.

Expand Down Expand Up @@ -43,6 +42,8 @@ You can browse though any local or remote branch without having to switch your b
>
>:::image type="content" source="media/vs-2022/git-repository-commit-details-full-screen.png" alt-text="Screenshot of full-screen commit details with diff configurations." lightbox="media/vs-2022/git-repository-commit-details-full-screen.png":::
<a name="compare-commits"/>

## Compare commits

To compare any two commits in your branch, use the **Ctrl** key to select the two commits that you want to compare. Then right-click one of them and select **Compare Commits**.
Expand All @@ -63,8 +64,41 @@ In Visual Studio, you can use the **Git Graph** pane in the **Git Repository** w
> [!NOTE]
> The equivalent command for this action is `git branch <branchname> [<commit-id>]`.
## Compare branches
Comparing branches provides an overview of differences between two branches which can be very helpful before creating a pull request, merging, or even deleting a branch.

:::image type="content" source="media/vs-2022/git-compare-branches-illustration.png" alt-text="Compare branches illustration" lightbox="media/vs-2022/git-compare-branches-illustration.png":::

To compare your currently checked out branch with other branches using Visual Studio, you can utilize the branch picker hosted in the status bar and the Git changes tool window to choose any local or remote branch to compare with. Right click the branch you are targeting and select **Compare with Current Branch**. Alternatively, you can utilize the branch list on the Git Repository window to access the same command.

:::image type="content" source="media/vs-2022/git-compare-branches-entrypoints.gif" alt-text="Compare branches entrypoints":::

Selecting **Compare with Current Branch** opens the compare branches experience where you can navigate the **Changes** list and select the file that you would like to compare.

:::image type="content" source="media/vs-2022/git-compare-branches.png" alt-text="Compare branches diff view" lightbox="media/vs-2022/git-compare-branches.png":::

> [!TIP]
> To learn how the [Preview](/visualstudio/releases/2022/release-notes-preview) version of Visual Studio 2022 makes it easy to checkout commits, see the "Checkout commits" section of the [Introducing new Git features to Visual Studio 2022](https://devblogs.microsoft.com/visualstudio/introducing-new-git-features-to-visual-studio-2022/#checkout-commits) blog post.
> If you prefer an inline diff, you can use the diff configuration options gear and switch to an inline diff view.
> :::image type="content" source="media/vs-2022/git-diff-configuration-options.png" alt-text="Diff configuration options":::
## Checkout commits
Checking out a commit can be beneficial in multiple ways. For example, it allows you to go back to a previous point in your repository’s history where you can run or test your code. It can also be helpful if you would like to review code from a remote branch (a colleague’s branch, for example). That way you don’t need to create a local branch if you are not planning on contributing to it. In this case, you can just checkout the tip of the remote branch that you would like to review.

:::image type="content" source="media/vs-2022/git-checkout-commit-illustration.png" alt-text="Checkout commit illustration":::

To checkout a previous commit in Visual Studio, open the **Git Repository** window, right click on the commit you would like to go back to and select **checkout (–detach)**. Visual Studio shows a confirmation dialog explaining that by checking out a commit you will be in a detached HEAD state. Meaning that the HEAD of your repository is going to point directly to a commit instead of a branch.

:::image type="content" source="media/vs-2022/git-checkout-commit-entrypoints.gif" alt-text="Checkout commit entry points":::

Now that you are in a detached head state, feel free to run and test your code or even explore and commit changes. When you are done exploring and want to go back to your branch, you can choose to discard your changes by checking out an existing branch or choose to keep your changes by **[creating a new branch](git-create-branch.md)** first.

> [!IMPORTANT]
> Commits created in a detached head state are not associated with any branch and may be garbage collected by Git after you checkout a branch. That is why to keep your changes, it is recommended to create a new branch before checking out a branch. For example, commits C5 and C6 will be garbage collected if we check out Main without creating a new branch.
> :::image type="content" source="media/vs-2022/git-detached-head-commits-illustration.png" alt-text="Detached head commits illustration":::
> To learn more about the detached head state view the following Git documentation: [Detached Head](https://git-scm.com/docs/git-checkout#_detached_head)
Checking out the tip of a remote branch can be helpful if you would like to quickly review a pull request and evaluate the latest updates. To do that in Visual Studio, first make sure to fetch and get the latest updates from your remote repository. Then right click on the remote branch you would like to review and select **Checkout Tip Commit**.
:::image type="content" source="media/vs-2022/git-checkout-tip-commit.png" alt-text="Checkout tip commit" lightbox="media/vs-2022/git-checkout-tip-commit.png":::

## Next steps

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.