

Repository name will be auto populated with the same name as Project. In Team Explorer, you see many options as below.Ĭlick on Sync and you will find 3 options to choose from – > GitHub, Azure DevOps and Remote Repository. If not shown, Click on View -> Team Explorer. On each file and folder, you will see a blue lock symbol.įor older version of Visual Studio, after you click on Add Solution to Source Control, you come to Team Explorer tab. You can verify going to the GitHub whether your code is pushed or not. Rest everything will be taken care by Visual Studio. Now, you just have to click Create and Push. Also, it will show you the new URL created for your GitHub repo. Once you sign in, your GitHub username will be populated in Owner and Account field. You will have to sign in to GitHub and give a name of the repository.

For latest visual studio, a Git popup will be shown asking to create a Git repository. If you are using older version of Visual Studio, you will see that, as soon as you click, an empty git repo is created locally and a blue lock symbol comes in front of every file and folder. On the older version of Visual Studio, it will be “Add Solution to source control”. Right click on the solution file and click Create Git Repository. The only change will be, here we will be following it visually with User Interface. If you have read my post on Pushing the Code to GitHub using Command Line, you might be knowing that here also we will be following the same approach. You will have similar project like this with a Solution and under the solution one or more projects.

I hope you have the project or code changes ready in the Visual Studio to be pushed to GitHub. Visual Studio download link can be found in downloads page. Check out my previous post where we saw How to Create GitHub Repository? Pre-requisites In this post we will push our code to the created repository in GitHub using the Visual Studio. It lets you and others work together on projects from anywhere. GitHub is a code hosting platform for version control and collaboration. Keeping a track of your changes and its history is very important for a developer.
