Using Git-TFS in Visual Studio 2013 Express

Microsoft has released Visual Studio 2013 Preview, and announced the availability of Git for Visual Studio and Team Foundation Service. Today, let’s go through the new experience of version control in VS 2013 Preview.

Account Creation

Microsoft provides Team Foundation Service Free Plan for up to 5 users. I’m using the service for demo in this article. If you don’t have an in-house TFS Server, you can also take advantage of it and sign up for an account here. If you need a TFS Hosting service with good customer service, you may check out Dynamsoft TFS Hosting plans.

After creating an account with Microsoft TFS Service, you will be directed to your TFS page like the one shown below. You can see two options for creating a team project. The account URL is located below “Getting started”.

TFS main page

Team Project Creation

Click “New team project + Git” to create a team project using Git as the source control provider.

create git project

Specify the project name and select Git for version control.

specify new project

This is the page for my newly created team project. After creating the team project, we can then push the local repo to remote server.

project created

Local Project Creation

Create a new project in Visual Studio, and do not forget to check “Add to source control”.

create local project

Choose Git as your source control system.

choose git

Now you will be able to view the changes of your source code.

changes of source code

Commit your code.

commit changes

Right click a file in Team Explorer, you can compare version differences with syntax highlighting.

diff files

Also, checking repo history is convenient by right click.

view history

Publish to Remote Repository

Switch to Commits.

switch to Commits

Find Git URL on your TFS account.

git URL

Copy the URL to remote repository configuration, and click “Publish” to upload your local files to remote server.

publish to remote repo

Check commits information online.

commit log

Import Git from GitHub

Clone Git repo.

git clone

Download source code to local disk.

clone finished

Double-click your repo and click “Open” to mount your project.

open cloned project

That’s all about how to simply use Git between Visual Studio 2013 Express and Git remote server.