Geeks With Blogs
Jonathan Mills' Blog Agile isn't something you do, it's something you are...

In my last post I showed you how to get started using TFS in the cloud. By itself, this is very cool, but setting it up for source control makes it even better. In this post, we will work through the process of setting up source control and getting code checked in.

Lets get started. First and foremost, get VS 11 open and running. Connect to the TFS instance you created in the last post. If the Team Explorer window is not open, open it by clicking on View->Team Explorer.

source

In the Team Explorer window, click Source Control Explorer to open the Source Control window.

source0.5

The first step in setting up source control on your PC is setting up your local working directory. This is the directory that TFS will use to store local copies of your source code. Setting it up can be done in a few different ways, but the easiest way, in my opinion, is to do a quick checkout of the empty project. This will kick off the process of setting it up.

To get started, right click on the project you created in the last tutorial. From the menu, click “Get Latest Version”

Source1

In the next popup box, select a Local folder to store your source files. I tend to chose something simple in case I need to do anything with command line…

Source2

Just that simple.  Now, lets get some code in there…

Start by creating a new application in Visual Studio by clicking File-> New –> Project. For now lets just create a simple console application. On the bottom right of the dialog box, there is a check box labeled “Add to source control.” Be sure you check that…

Source2-5

Once you click “Ok” you may be prompted to select a TFS Project and Location for the solution. If you are, select the top level of the project and type a folder name in the text box. Then click “OK”

Source4

 

Once that is done, you should be rewarded with a folder and some files that need to be checked in. Please note, until you commit those pending changes, nothing is stored on the server side. So lets do that now.

Right click on the project in Source Control Explorer and click “Check In Pending Changes.”

Source6

Now comes a rather larger difference in VS 11. Instead of working in a dialog box, all your check-in options will be displayed in a side panel in Visual Studio. Look to the right and locate the Team Explorer – Pending Changes window.

Source7

From this panel you can write a comment, add related work items, and pick what files are included or excluded. You can also Shelve your changes here. But we will talk about that in a later post.

Click “Check In” and off you go.

 

Congratulations, you now have your own private source control repository complete with code, nestled safely up in the cloud.

Posted on Tuesday, July 31, 2012 1:02 PM TFS | Back to top


Comments on this post: TFS In The Cloud – Source Control

# re: TFS In The Cloud – Source Control
Requesting Gravatar...
However, averages for Kansas were higher than techs employed in NE and OK. Compare all dental assistant salaries by State!
Dental Assistant Wage in KS
Left by Technician School on Jul 31, 2012 8:32 PM

# re: TFS In The Cloud – Source Control
Requesting Gravatar...
You have shared an informative post. I think it is very useful to read this post regarding the TFS in The Cloud. I appreciate you for sharing this post here. I am very happy to read this one. Really informative and also useful!

how to get a man bun
Left by Lloyd on Dec 31, 2015 5:38 AM

Your comment:
 (will show your gravatar)


Copyright © Jonathan Mills | Powered by: GeeksWithBlogs.net