Hi William Thompson,

Thank you for reaching out to Microsoft Q & A forum. 

To connect an existing Visual Studio 2022 project to a GitHub repository, follow these steps: 

1.Ensure Git is Installed in Visual Studio 2022 

Visual Studio includes Git by default. If it's not already configured, navigate to Tools > Options > Source Control > Plug-in Selection and choose Git from the available options. 

2.Open Your Project in Visual Studio 

Launch Visual Studio 2022 and open the project you want to connect to GitHub. 

3.Sign In to Your GitHub Account 

Go to View > GitHub (or Team Explorer, depending on your setup). 

In the Team Explorer window, select Connect and sign in to your GitHub account if you haven't already. 

4.Configure the Remote URL for Your GitHub Repository 

Open Team Explorer by selecting View > Team Explorer. 

In the Branches section, right-click your main branch (usually main or master) and select Manage Branches. 

In the Git Changes window, click the Settings icon. 

In Repository Settings, under the Remotes section, click Add. 

Enter the remote name (commonly origin for the primary remote) and paste your GitHub repository’s URL, which you can find by clicking the Code button in GitHub and copying the HTTPS URL. 

5.Push Your Project to GitHub 

After setting the remote URL, navigate to View > Git Changes. You should now see that your project is linked to your GitHub repository. 

Commit any changes by clicking Commit All, add a commit message, and then press Push to upload your local changes to GitHub. 

6.Confirm Your Project on GitHub 

Visit your GitHub repository in a browser to confirm the project files have been successfully uploaded. You should also see your commit history reflected. 

For more detailed guidance, refer to the official Visual Studio documentation.Please feel free to contact us if you have any additional questions.    If you have found the answer provided to be helpful, please click on the "Accept answer/Upvote" button so that it is useful for other members in the Microsoft Q&A community.       

Thank you. 

🌐
Microsoft
visualstudio.microsoft.com › vs › github
Visual Studio and GitHub - Microsoft
July 15, 2026 - GitHub support is now built into Visual Studio.
🌐
C# Corner
c-sharpcorner.com › home › technologies › visual studio › how to use github in visual studio 2022
How To Use Github In Visual Studio 2022
June 28, 2022 - First, we need to add our Github account in the Visual Studio and then we have a create a repository with the proper name according to our needs. Now click on the Create and Push the button and Visual Studio automatically pushed all the files ...
🌐
Microsoft Learn
learn.microsoft.com › en-us › visualstudio › version-control › git-with-visual-studio
About Git in Visual Studio | Microsoft Learn
In Visual Studio 2022 version 17.12, you can select any section of code, and then right-click, expand the Git submenu, and choose Copy GitHub Permalink (or Copy AzureDevOps Permalink) to generate a GitHub Permalink or Azure DevOps Permalink ...
Top answer
1 of 1
1

Hi William Thompson,

Thank you for reaching out to Microsoft Q & A forum. 

To connect an existing Visual Studio 2022 project to a GitHub repository, follow these steps: 

1.Ensure Git is Installed in Visual Studio 2022 

Visual Studio includes Git by default. If it's not already configured, navigate to Tools > Options > Source Control > Plug-in Selection and choose Git from the available options. 

2.Open Your Project in Visual Studio 

Launch Visual Studio 2022 and open the project you want to connect to GitHub. 

3.Sign In to Your GitHub Account 

Go to View > GitHub (or Team Explorer, depending on your setup). 

In the Team Explorer window, select Connect and sign in to your GitHub account if you haven't already. 

4.Configure the Remote URL for Your GitHub Repository 

Open Team Explorer by selecting View > Team Explorer. 

In the Branches section, right-click your main branch (usually main or master) and select Manage Branches. 

In the Git Changes window, click the Settings icon. 

In Repository Settings, under the Remotes section, click Add. 

Enter the remote name (commonly origin for the primary remote) and paste your GitHub repository’s URL, which you can find by clicking the Code button in GitHub and copying the HTTPS URL. 

5.Push Your Project to GitHub 

After setting the remote URL, navigate to View > Git Changes. You should now see that your project is linked to your GitHub repository. 

Commit any changes by clicking Commit All, add a commit message, and then press Push to upload your local changes to GitHub. 

6.Confirm Your Project on GitHub 

Visit your GitHub repository in a browser to confirm the project files have been successfully uploaded. You should also see your commit history reflected. 

For more detailed guidance, refer to the official Visual Studio documentation.Please feel free to contact us if you have any additional questions.    If you have found the answer provided to be helpful, please click on the "Accept answer/Upvote" button so that it is useful for other members in the Microsoft Q&A community.       

Thank you. 

🌐
Microsoft Learn
learn.microsoft.com › en-us › visualstudio › ide › work-with-github-accounts
Add GitHub accounts to your keychain - Visual Studio (Windows) | Microsoft Learn
You can add your public GitHub account at first launch or later, without needing to sign into Visual Studio with a Microsoft account, work account, or school account. You can add multiple GitHub accounts to the IDE.
🌐
DEV Community
dev.to › satyakarki › how-to-use-visual-studio-for-github-repository-29l9
How to Use Visual Studio for GitHub Repository - DEV Community
September 22, 2022 - For my case, I had already login into the GitHub account on my machine, so account and owner details were auto-populated on the screen below. After that, if you want to make your repository public then unselect the Private repository. Furthermore, if you are using Visual Studio Community Preview 2022 - 17.3.0 Preview 5.0 or a later version of Visual Studio then you can get more options for your repository setup such as gitignore template, License template, and Readme file as portrayed below.
🌐
GitHub
github.com › MicrosoftDocs › visualstudio-docs › blob › main › docs › ide › work-with-github-accounts.md
visualstudio-docs/docs/ide/work-with-github-accounts.md at main · MicrosoftDocs/visualstudio-docs · GitHub
Select the icon with your profile name in the upper-right corner of the Visual Studio environment, select GitHub if you haven't already signed in or Add another account, and then select GitHub.
Find elsewhere
🌐
C# Corner
c-sharpcorner.com › article › visual-studio-for-github-repository
Visual Studio For GitHub Repository
September 17, 2022 - For my case, I had already login into the GitHub account on my machine, so account and owner details were auto-populated on the screen below. After that, if you want to make your repository public then unselect the Private repository. Furthermore, if you are using Visual Studio Community Preview 2022 - 17.3.0 Preview 5.0 then you can get more options for your repository setup such as gitignore template, License template, and Readme file as portrayed below.
🌐
Microsoft Learn
learn.microsoft.com › en-us › visualstudio › version-control › git-create-repository
Create a Git repo or work remotely with a provider - Visual Studio (Windows) | Microsoft Learn
Visual Studio populates your new app with default "Hello, World!" code. From the Git menu, select Create Git Repository. In the Create a Git repository dialog, under the Push to a new remote section, choose GitHub.
🌐
Pluralsight
pluralsight.com › courses › visual-studio-2022-working-git-github
Working with Git and GitHub in Visual Studio 2022
March 23, 2023 - To track and store the changes of your source code and to collaborate with other .NET developers, you can use Visual Studio’s integrated support for Git and GitHub. In this course, Working with Git and GitHub in Visual Studio 2022, you’ll learn how to use Git and GitHub in Visual Studio for source control.
🌐
Visual Studio Code
code.visualstudio.com › docs › sourcecontrol › github
Work with GitHub in VS Code
October 7, 2026 - You can search for and clone a repository from GitHub using the Git: Clone command in the Command Palette (⇧⌘P (Windows, Linux Ctrl+Shift+P)) or by using the Clone Repository button in the Source Control view (available when you have no ...
🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
GitHub Extension for Visual Studio - Visual Studio Marketplace
October 28, 2021 - Extension for Visual Studio - A Visual Studio Extension that brings the GitHub Flow into Visual Studio.
🌐
Microsoft Learn
learn.microsoft.com › en-us › visualstudio › get-started › tutorial-open-project-from-repo
Tutorial: Open project from repo in Visual Studio - Visual Studio (Windows) | Microsoft Learn
March 17, 2026 - In the Visual Studio IDE, select the Git menu, and then select Clone Repository. Follow the prompts to connect to the Git repository that includes the files that you're looking for.
🌐
GeeksforGeeks
geeksforgeeks.org › git › how-to-link-github-with-visual-studio
How to Link GitHub with Visual Studio? - GeeksforGeeks
May 30, 2024 - Launch Visual Studio from your desktop or start menu. ... Go to File > Account Settings. ... If your GitHub account is already open in the browser cache, the below interface will be opened.
🌐
GitProtect.io
gitprotect.io › strona główna › github with visual studio code guide
GitHub with Visual Studio Code Guide - Blog | GitProtect.io
January 19, 2022 - Then, when you select the Clone from GitHub, you’ll be asked to enable a sign-in attempt. Click on “Allow” to this git commands and proceed with authentication. After that, in Visual Studio Code, you should be able to see all the repositories from that GitHub account.
Top answer
1 of 3
4

The "old" team explorer did a number of really nice things, but it was also very hard to integrate into for other tool vendors. With the new Git experience the Visual Studio team opted for a more agnostic approach.

The old Team Explorer was written in .NET 4 and was very much geared towards integrating with Azure DevOps. It stems from 2005 when Team Foundation Server first got released. Over time other vendors snuck their way into Team Explorer, but mostly through undocumented and unsupported ways. This has caused many interesting issues in the past. The concept of the Team Explorer window also wasn't ideal for hosting GitHub, Azure DevOps, BitBucket and every other tool-vendor that wanted to be listed and there was very little in the way of control for users to set the order of elements or hide certain tiles. As such it's a breeding ground for bugs and it needed to be ported to .NET Core and x64 and to support out-of-process extensibility to properly support Visual Studio 2022 anyway.

So Team Explorer and its old undocumented extensibility points were dropped and the new Git Window was born. This window is a pure git client and it's vendor agnostic. Vendors may add menu items to the top level menu, but they currently can't extend the new git window.

At the same time, Visual Studio 2022 dropped support for the built-in browser window, which was a memory hog, loads IE11 and also needed full retooling to support the x64 out-of-process loading that Visual Studio 2022 now demands.

All of this work now allows Visual Studio to use more memory, it's faster and by moving extensions out-of-process, it has greatly improved the performance and stability of the visual studio platform. Unfortunately this all happened at the expense of some features.

The new git experience is no longer constrained by the Team Explorer window, is a top-level citizen in Visual Studio and can finally use easier to remember keyboard shortcut keys. It's much faster too and the new architecture allowed the team to build interactive rebase, multi-repo support, submodule support and more. But their priorities have been in advanced git scenarios for a long while, not in building support for vendor specific issue integration. It looks like that may be changing though. Auto-completion of #... is now in Visual Studio 17.5 preview:

Some tool vendors may invest in native integration into Visual Studio in the future. Many old extensions are no longer available in VS2022 or the authors are still working on a new version that conforms to the new requirements.

On the other hand you have VS Code, which is used by GitHub itself internally, runs in a browser, powers github.dev and github codespaces and doesn't carry the legacy if Visual Studio 2022. It's not Microsoft, but GitHub who has extended vscode and they added the support for their platform through extensions and open source contribution to the editor directly. GitHub has a different stake in vscode, they have the engineering staff that knows how to extend atom-based applications (they basically built that technology) thus, their features have been added to vscode.

Is it fair? Do we want it in big VS as well? Sure, but unfortunately, that's currently not where the money is being spent.

There are a few ways to accomplish what you want. But none are exactly what you desire.

The web

The main way is to start working from the browser. On every issue there is a Development section from which you can create a branch or initiate a pull request from the associated branch:

You can then immediately check it out locally

Or navigate to the code panel for the branch and click the open in visual studio link. This will launch visual studio in the correct context using the repo you selected and will check out the branch locally for you to start working.

Any commits you make to this branch are automatically associated to the issue, so there's no need to pass in the #issuenumber every time.

The cli

An alternative to working from the browser is to use the CLI. If you have the GitHub CLI installed it will pick up the context of your repo from the list of remotes and you can perform quick commands straight from visual studio's built-in terminal.

gh pr create

to create a new PR.

gh issue list

to quickly list your open issues

gh issue develop #issuenumber

to create a branch on the remote, associate it to your issue and check out the branch locally.

It takes a bit of getting used to the commands, but if you like the CLI it's a quick way to work.

In Visual Studio

You can create pull requests from your current state, which will then bring you to the browser with most of the data pre-filled. Issue auto-completion also works in the browser from that point forward.

To get the other features you want, you must install extensions. Unfortunately, GitHub has stopped development on the old GitHub for Visual Studio extension since most of its features have now moved into visual studio. It's not easy to build and maintain an extension for multiple versions of Visual Studio, so I don't expect this will be brought back to life.

I rely on the Git Web links extension to quickly switch between web and visual studio from the context of my working files:

In the settings you can set the default behavior to not copy, but to open in browser.

Other functionality you're after is currently not available through a publicly listed extension. Most of there features have also been removed or deprecated for Azure DevOps itself, so I don't expect the Visual Studio team to be in a hurry to add first-class support for Issue tracking back in.

2 of 3
1

It seems like the VS2022 will have this feature in future (it's in Preview now).

https://youtu.be/0NiHvdoMBO8?t=95 [VS2022 Preview Feature]

🌐
Stack Overflow
stackoverflow.com › questions › 79033006 › how-do-i-connect-my-existing-visual-studio-2022-project-to-an-existing-github-re
How do I connect my existing Visual Studio 2022 project to an existing github repository? - Stack Overflow
In Visual studio I opened a command window by click on CTRL + ` . Then using the .git file and its location from my github repository, I typed at the command line: git clone https://github.com/Wm-M-Thompson/SharePointListCreation.git