Create New Git Repository While Creating New Project in Visual Studio

Create New Git Repository While Creating New Project in Visual Studio

You can create new git repository while creating new project in Visual Studio. Yes, at the same time of new project created in Visual Studio. In that case, you really don’t need to initialize the repo separately post your project creation and you can start working with the repository directly. You can create a new Git repository at the same time we create the new project from the New Project Dialog Window.

Create new git repository while creating new project in Visual Studio

  • Start a new instance of Visual Studio
  • Launch the New Project Dialog Window by navigating from File -> New -> Project
  • Select the Project Template and provide all other required information for project creation
  • Select the “Create new Git Repository” checkbox
  • Click on OK

Create New Git Repository
And that’s it. Now we have created a new project, and it’s under a Git repository. You can now use the source code directly as your local git repository and further then push it to remote branches as needed.

Git Repo for New Project

This is a very straightforward way to connecting your solution with Git Repository. There are several other ways to enable this, but this is an overlooked feature which can make things faster and easier.

Hope this helps

Abhijit Jana

Abhijit runs the Daily .NET Tips. He started this site with a vision to have a single knowledge base of .NET tips and tricks and share post that can quickly help any developers . He is a Former Microsoft ASP.NET MVP, CodeProject MVP, Mentor, Speaker, Author, Technology Evangelist and presently working as a .NET Consultant. He blogs at http://abhijitjana.net , you can follow him @AbhijitJana . He is the author of book Kinect for Windows SDK Programming Guide.

One Comment to “Create New Git Repository While Creating New Project in Visual Studio”

Comments are closed.