Skip to content

Latest commit

 

History

History
67 lines (51 loc) · 12.9 KB

git-team-explorer-feature-comparison.md

File metadata and controls

67 lines (51 loc) · 12.9 KB
title titleSuffix description ms.date ms.topic author ms.author ms.manager ms.subservice monikerRange
Side-by-side comparison of Git and Team Explorer in Visual Studio 2019
Compare and contrast how to use the Git experience versus Team Explorer in Visual Studio to manage source control.
11/29/2022
how-to
ghogen
ghogen
mijacobs
general-ide
vs-2019

Compare the Git experience to Team Explorer in Visual Studio 2019

We launched the first version of a Git experience in Visual Studio 2019 version 16.8. 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.

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

Note

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.)

Get started

Team Explorer The Git experience
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":::

1. Open the Connect page.
2. Expand Manage Connections.
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":::

1. Open the Git menu.
2. Select Clone Repository.

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":::

1. Open the Connect page.
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":::

1. Open the Git menu.
2. Select a repository from the Local Repositories list.
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":::

1. Open the Home page in Team Explorer.
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":::

1. Open the Switch Views page in Solution Explorer.
2. Select a solution from the solution list.
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":::

1. Select Git from the Add to Source Control status bar menu.
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":::

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.
2. Select Create and Push.

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.

Tip

The Git experience 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.

Git changes

Team Explorer The Git experience
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":::

1. Enter a commit message.
2. Select Commit All.
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":::

1. Enter a commit message.
2. Select Commit All.
3. To stage specific files, hover over them, and then click the “+” icon.
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":::

1. Click the Actions drop-down.
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":::

1. Click the Amend checkbox.
2. Click Commit All to commit your updates.
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":::

1. Click the Stash drop-down.
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":::

1. Click the Commit All drop-down.
2. Select the relevant Stash option.

Synchronization

Team Explorer The Git experience
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":::

1. Navigate to the Synchronization page.
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":::

1. Locate the fetch, pull, and push buttons in the Git Changes window.
2. Click the network operation of your choice.
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":::

1. Navigate to the Synchronization page.
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":::

1. Click the outgoing / incoming link in the Git Changes window.
2. View your incoming and outgoing commits by using the icons in the graph table at the top of the Git Repository window.

Branches

Team Explorer The Git experience
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":::

1. Navigate to the Branches window.
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":::

1. On the Git Changes window, click the branch drop-down list.
2. Click New Branch.
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":::

1. Navigate to the Branches page.
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":::

1. Click the branch drop-down list.
2. Under the Remotes tab, click the remote branch and select Merge into Current Branch or Rebase Current Branch onto.
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":::

1. Navigate to the Branches window.
2. Right-click the branches that you would like to manage.
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":::

1. Navigate to the Git repository window by using one of the following entry points:

a. From the top-level Visual Studio menu, select Git > Manage Branches.
b. Select Git changes > incoming/outgoing.
c. From the status bar menu at the bottom-right, select Manage Branches.

2. From the top-level Git > Manage Branches menu, do either of the following actions:

A. Right-click the branches.
B. Multi-select the commits that you want to manage.

Conflict resolution

Team Explorer The Git experience
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":::

1. Navigate to the Resolve Conflicts window by clicking the Conflicts link.
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":::

1. Verify that Merge in progress with conflicts appears.
2. The list of files with merge conflicts appears in the Unmerged Changes section of the Git Changes window.
Resolve the conflicts.

Related content