Steps of Project Connects Visual Studio Online Git Project

2014-02-28


If you create a new project, and want to use Visual Studio Online to control your source code, for example, use Git which provided by Visual Studio Online, using the following steps, you can get the connection between your local project and remote Git very well:

1: Create a new project in Visual Studio Online, and set the source control to Git (actually it is up to you here, you can select other option here, but this blog’s sample is using Git);

2: Create a new project in your local Visual Studio 2013 (you can use the same project name with your Visual Studio online project);

Important!  add your local project to source control then, so that you have a local Git repository now.

3: In local Visual Studio 2013, Team Explore window, make sure your local repository is selected, Click "Change" link, to commit your new project to your local repository;

4: Still In local Visual Studio 2013, Team Explore window, click "Connect to Team Projects" icon, then click "Select Team Projects…" link:

image

5: In the window which you can see here, check on the project name which you created in Visual Studio Online, click Connect button;

6: Now you connected Visual Studio Online project, in Connect screen, right click your local repository, and select "Push xxxx  to xxx" item, so that your local repository is uploaded to Visual Studio Online project;

(If you can not see "Push… to ….", you double click remote repository (to make sure current repository chosen is remote repository), and go back to Connect screen, and right click local repository )

Now your connect between local and Visual Studio Online created, you can continue work now.