Skip to content

Commit 1e83373

Browse files
authored
Merge pull request #7624 from MicrosoftDocs/main637795083020268139
For protected CLA branch, push strategy should use PR and merge to target branch method to work around git push error
2 parents 3b0b5f6 + c39a795 commit 1e83373

File tree

37 files changed

+163
-75
lines changed

37 files changed

+163
-75
lines changed
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
466 Bytes
Loading
552 Bytes
Loading
545 Bytes
Loading
519 Bytes
Loading

docs/profiling/memory-usage-without-debugging2.md

Lines changed: 127 additions & 40 deletions
Large diffs are not rendered by default.

docs/version-control/git-browse-repository.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
2-
title: Browse a repo in Visual Studio
3-
titleSuffix: ""
2+
title: Browse a repo & compare commits
43
description: Browse any Git repository in Visual Studio by using the Git Repository window.
54
ms.date: 01/21/2022
65
ms.topic: how-to
@@ -10,7 +9,7 @@ ms.manager: jmartens
109
ms.prod: visual-studio-windows
1110
ms.technology: vs-ide-general
1211
---
13-
# Browse Git repositories in Visual Studio
12+
# Browse Git repositories & compare commits in Visual Studio
1413

1514
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.
1615

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,71 @@
11
---
22
title: Side-by-side comparison of Git and Team Explorer in Visual Studio 2019
33
titleSuffix: ""
4-
description: Compare and contrast how to use the new Git experience versus Team Explorer in Visual Studio to manage source control.
4+
description: Compare and contrast how to use the Git experience versus Team Explorer in Visual Studio to manage source control.
55
ms.date: 11/08/2021
66
ms.topic: how-to
77
author: Taysser-Gherfal
88
ms.author: tglee
99
ms.manager: jmartens
1010
ms.prod: visual-studio-windows
1111
ms.technology: vs-ide-general
12-
monikerRange: "<=vs-2019"
12+
monikerRange: "vs-2019"
1313
---
14-
# Side-by-side comparison of Git and Team Explorer
14+
# Compare the Git experience to Team Explorer in Visual Studio 2019
1515

16-
We launched the first version of a new Git experience in Visual Studio 2019 [version 16.8](/visualstudio/releases/2019/release-notes/). This new experience helps reduce context switching with a simple **Git Changes** window that includes common Git tasks. It also includes a screen-wide **Git Repository** window for more advanced Git operations, such as branch management and repository browsing.
16+
We launched the first version of a Git experience in Visual Studio 2019 [version 16.8](/visualstudio/releases/2019/release-notes/). This experience helps reduce context switching with a simple **Git Changes** window that includes common Git tasks. It also includes a screen-wide **Git Repository** window for more advanced Git operations, such as branch management and repository browsing.
1717

18-
If you’ve been using Team Explorer, here is a step-by-step guide that explains how you can use the new Git experience.
18+
If you’ve been using Team Explorer, here is a step-by-step guide that explains how you can use the Git experience.
1919

2020
> [!NOTE]
2121
> The following section includes screenshots sized to fit in the columns of a table. Click each screenshot to view a larger version of it. (If you're using a touchscreen device, tap each screenshot to view a larger version of it.)
2222
2323
## Get started
2424

25-
| |Team Explorer |The new Git experience |
25+
| |Team Explorer |The Git experience |
2626
|---------|---------|---------|
2727
|**Clone a repo** | :::image type="content" source="media/clone-repo-team-explorer-sml.png" alt-text="Screenshot of the Connect window for Team Explorer in Visual Studio 2019, with a 'clone a repo' procedure overlay." lightbox="media/clone-repo-team-explorer-lrg.png"::: </p>1. Open the **Connect** page. <br> 2. Expand **Manage Connections**. <br> 3. Select **Connect to Project**. | :::image type="content" source="media/clone-repo-new-git-sml.png" alt-text="Screenshot of the Git menu in Visual Studio 2019, with a 'clone a repo' procedure overlay." lightbox="media/clone-repo-new-git-lrg.png"::: </p> 1. Open the **Git** menu. <br>2. Select **Clone Repository**. <br><br> |
2828
|**Switch between repos** | :::image type="content" source="media/switch-repos-team-explorer-sml.png" alt-text="Screenshot of the Connect window for Team Explorer in Visual Studio 2019, with a 'switch between repos' procedure overlay." lightbox="media/switch-repos-team-explorer-lrg.png"::: </p>1. Open the **Connect** page. <br>2. Select a repository from the **Local Repositories** list. | :::image type="content" source="media/switch-repos-new-git-sml.png" alt-text="Screenshot of the Local Repositories menu item in Visual Studio 2019, with a 'clone a repo' procedure overlay." lightbox="media/switch-repos-new-git-lrg.png"::: </p> 1. Open the **Git** menu. <br>2. Select a repository from the **Local Repositories** list. |
2929
|**Open a solution** | :::image type="content" source="media/open-solution-team-explorer-sml.png" alt-text="Screenshot of the Home window for Team Explorer in Visual Studio 2019, with an 'open a solution' procedure overlay." lightbox="media/open-solution-team-explorer-lrg.png":::</p>1. Open the **Home** page in **Team Explorer**. <br>2. Select a solution from the solution list. | :::image type="content" source="media/open-solution-new-git-sml.png" alt-text="Screenshot of Solution Explorer in Visual Studio 2019, with an 'open a solution' procedure overlay." lightbox="media/open-solution-new-git-lrg.png":::</p>1. Open the **Switch Views** page in **Solution Explorer**. <br>2. Select a solution from the solution list. |
3030
|**Add a solution to source control and create a new repository** | :::image type="content" source="media/source-control-team-explorer-sml.png" alt-text="Screenshot collage of Team Explorer options in Visual Studio 2019, with an Add to Source Control - Create Repo procedure overlay." lightbox="media/source-control-team-explorer-lrg.png":::</p>1. Select **Git** from the **Add to Source Control** status bar menu. <br>2. Select **Publish**. | :::image type="content" source="media/source-control-new-git-sml.png" alt-text="Screenshot collage of Git options in Visual Studio 2019, with an 'add to source control - create repo' procedure overlay." lightbox="media/source-control-new-git-lrg.png":::</p>1. Select **Git** from the **Add to Source Control** status bar menu, or select **Git** > **Create Git Repository** from the top-level Visual Studio menu bar. <br>2. Select **Create and Push**. </p> **Note**: Use the existing remote option if you want to add your code to Azure DevOps. In this case, you must create an Azure DevOps repository first. |
3131
> [!TIP]
32-
> The [new Git experience](git-with-visual-studio.md) should automatically connect to the correct Azure DevOps repo based on the repository or solution you opened. However, if you need to manually connect to the repo, you can still do that by using Team Explorer. From the Visual Studio menu bar, select **View** > **Team Explorer** > **Manage Connections** > **Connect**.
32+
> The [Git experience](git-with-visual-studio.md) should automatically connect to the correct Azure DevOps repo based on the repository or solution you opened. However, if you need to manually connect to the repo, you can still do that by using Team Explorer. From the Visual Studio menu bar, select **View** > **Team Explorer** > **Manage Connections** > **Connect**.
3333
3434
## Git changes
3535

36-
| |Team Explorer |The new Git experience |
36+
| |Team Explorer |The Git experience |
3737
|---------|---------|---------|
3838
|**Commit and stage** | :::image type="content" source="media/commit-stage-team-explorer-sml.png" alt-text="Screenshot of the Changes window for Team Explorer in Visual Studio 2019, with a 'commit and stage' procedure overlay." lightbox="media/commit-stage-team-explorer-lrg.png"::: </p>1. Enter a commit message. <br>2. Select **Commit All**. <br>3. To stage specific files, right-click them, and then select **Stage**. | :::image type="content" source="media/commit-stage-new-git-sml.png" alt-text="Screenshot of the Git Changes window in Visual Studio 2019, with a 'commit and stage' procedure overlay." lightbox="media/commit-stage-new-git-lrg.png"::: </p>1. Enter a commit message. <br>2. Select **Commit All**. <br>3. To stage specific files, hover over them, and then click the “**+**” icon. |
3939
|**Amend a commit** | :::image type="content" source="media/amend-commit-team-explorer-sml.png" alt-text="Screenshot of the Changes window for Team Explorer in Visual Studio 2019, with an 'amend a commit' procedure overlay." lightbox="media/amend-commit-team-explorer-lrg.png":::</p>1. Click the **Actions** drop-down. <br>2. Select **Amend Previous Commit**. | :::image type="content" source="media/amend-commit-new-git-sml.png" alt-text="Screenshot of the Git Changes window in Visual Studio 2019, with an 'amend a commit' procedure overlay." lightbox="media/amend-commit-new-git-lrg.png"::: </p>1. Click the **Amend** checkbox. <br>2. Click **Commit All** to commit your updates. |
4040
|**Stash a change** | :::image type="content" source="media/stash-change-team-explorer-sml.png" alt-text="Screenshot of the Changes window for Team Explorer in Visual Studio 2019, with a 'stash a change' procedure overlay." lightbox="media/stash-change-team-explorer-lrg.png":::</p>1. Click the **Stash** drop-down. <br>2. Select the relevant **Stash** option. | :::image type="content" source="media/stash-change-new-git-sml.png" alt-text="Screenshot of the Git Changes window in Visual Studio 2019, with a 'stash a change' procedure overlay." lightbox="media/stash-change-new-git-lrg.png":::</p>1. Click the **Commit All** drop-down. <br>2. Select the relevant **Stash** option. |
4141

4242
## Synchronization
4343

44-
| |Team Explorer |The new Git experience |
44+
| |Team Explorer |The Git experience |
4545
|---------|---------|---------|
4646
|**Fetch, pull, and push changes** | :::image type="content" source="media/fetch-pull-push-team-explorer-sml.png" alt-text="Screenshot of the Synchronization window for Team Explorer in Visual Studio 2019, with a 'fetch, pull, and push' procedure overlay." lightbox="media/fetch-pull-push-team-explorer-lrg.png":::</p>1. Navigate to the **Synchronization** page. <br>2. Click the network operation of your choice. | :::image type="content" source="media/fetch-pull-push-new-git-sml.png" alt-text="Screenshot of the Git Changes window in Visual Studio 2019, with a 'fetch, pull, and push' procedure overlay." lightbox="media/fetch-pull-push-team-new-git-lrg.png"::: </p>1. Locate the fetch, pull, and push buttons in the **Git Changes** window. <br>2. Click the network operation of your choice.|
4747
|**View Incoming and Outgoing commits** | :::image type="content" source="media/view-commits-team-explorer-sml.png" alt-text="Screenshot of the Synchronization window for Team Explorer in Visual Studio 2019, with a 'view incoming and outgoing commits' procedure overlay." lightbox="media/view-commits-team-explorer-lrg.png"::: </p>1. Navigate to the **Synchronization** page. <br>2. View your incoming and outgoing lists. | :::image type="content" source="media/view-commits-new-git-sml.png" alt-text="Screenshot of the Git Changes window and the Git Repository window in Visual Studio 2019, with a 'view incoming and outgoing commits' procedure overlay." lightbox="media/view-commits-new-git-lrg.png":::</p>1. Click the **outgoing / incoming** link in the **Git Changes** window. <br>2. View your incoming and outgoing commits by using the icons in the graph table at the top of the **Git Repository** window. |
4848

4949
## Branches
5050

51-
| |Team Explorer |The new Git experience |
51+
| |Team Explorer |The Git experience |
5252
|---------|---------|---------|
5353
|**Create a branch** | :::image type="content" source="media/create-branch-team-explorer-sml.png" alt-text="Screenshot of the Branches window for Team Explorer in Visual Studio 2019, with a 'create a new branch' procedure overlay." lightbox="media/create-branch-team-explorer-lrg.png":::</p>1. Navigate to the **Branches** window. <br> 2. Click **New Branch**. | :::image type="content" source="media/create-branch-new-git-sml.png" alt-text="Screenshot of the Git Changes window in Visual Studio 2019, with a 'create a new branch' procedure overlay." lightbox="media/create-branch-new-git-lrg.png"::: </p>1. On the **Git Changes** window, click the branch drop-down list. <br>2. Click **New Branch**. |
5454
|**Get the latest changes from a remote branch** | :::image type="content" source="media/sync-remote-team-explorer-sml.png" alt-text="Screenshot of the Branches window for Team Explorer in Visual Studio 2019, with a 'get recent changes from remote branch' procedure overlay." lightbox="media/sync-remote-team-explorer-lrg.png"::: </p>1. Navigate to the **Branches page**. <br>2. Right-click the remote branch and select **Merge From** or **Rebase Onto**. | :::image type="content" source="media/sync-remote-new-git-sml.png" alt-text="Screenshot of the Git Changes window in Visual Studio 2019, with a 'get recent changes from remote branch' procedure overlay." lightbox="media/sync-remote-new-git-lrg.png":::</p>1. Click the branch drop-down list. <br>2. Under the **Remotes** tab, click the remote branch and select **Merge into Current Branch** or **Rebase Current Branch onto**. |
5555
|**Manage branches** | :::image type="content" source="media/manage-branches-team-explorer-sml.png" alt-text="Screenshot of the Branches window for Team Explorer in Visual Studio 2019, with a 'manage branches' procedure overlay." lightbox="media/manage-branches-team-explorer-lrg.png"::: </p>1. Navigate to the **Branches** window. <br>2. Right-click the branches that you would like to manage. <br>3. View **History** of branches to manage commits. | :::image type="content" source="media/manage-branches-new-git-sml.png" alt-text="Screenshot collage of how three UI options to use to manage branches in Visual Studio 2019." lightbox="media/manage-branches-new-git-lrg.png"::: </p>1. Navigate to the Git repository window by using one of the following entry points: <br><br>a. From the top-level Visual Studio menu, select **Git** > **Manage Branches**.<br> b. Select **Git changes** > **incoming/outgoing**. <br>c. From the status bar menu at the bottom-right, select **Manage Branches**.<br> <br> 2. From the top-level **Git** > **Manage Branches** menu, do either of the following actions: <br><br>A. Right-click the branches.<br>B. Multi-select the commits that you want to manage. |
5656

5757
## Conflict resolution
5858

59-
| |Team Explorer |The new Git experience |
59+
| |Team Explorer |The Git experience |
6060
|---------|---------|---------|
6161
|**Access list of files with conflicts** | :::image type="content" source="media/resolve-conflicts-team-explorer-sml.png" alt-text="Screenshot collage of the Changes window and the Resolve Conflicts window for Team Explorer in Visual Studio 2019, with a procedure overlay." lightbox="media/resolve-conflicts-team-explorer-lrg.png":::</p>1. Navigate to the **Resolve Conflicts** window by clicking the **Conflicts** link. <br> 2. Use the **Conflicts** list to resolve your merge conflicts. | :::image type="content" source="media/resolve-conflicts-new-git-sml.png" alt-text="Screenshot of the Git Changes window in Visual Studio 2019, with a 'resolve conflicts' procedure overlay." lightbox="media/resolve-conflicts-new-git-lrg.png"::: </p>1. Verify that **Merge in progress with conflicts** appears. <br>2. The list of files with merge conflicts appears in the **Unmerged Changes** section of the **Git Changes** window. <br>Resolve the conflicts. |
6262

6363
## Next steps
6464

65-
For more information about the new Git experience, see the latest video, [Getting started with Git in Visual Studio 2019](https://www.youtube.com/watch?v=GCZ9x3yqkyc), on YouTube.
65+
For more information about the Git experience, see the latest video, [Getting started with Git in Visual Studio 2019](https://www.youtube.com/watch?v=GCZ9x3yqkyc), on YouTube.
6666

6767
## See also
6868

69-
- [The new Git experience in Visual Studio 2019](git-with-visual-studio.md?view=vs-2019&preserve-view=true)
69+
- [The Git experience in Visual Studio 2019](git-with-visual-studio.md?view=vs-2019&preserve-view=true)
7070
- [Get Started with Git and GitHub in Visual Studio](/learn/modules/visual-studio-github-push/)
71-
- [Work with GitHub accounts in Visual Studio](../ide/work-with-github-accounts.md)
71+
- [Work with GitHub accounts in Visual Studio](../ide/work-with-github-accounts.md)

0 commit comments

Comments
 (0)