Video: Creating a repository and a project

All right, let's get ready to create some projects inside the TFS. There is only one repository in TFS, and that's on a machine-by-machine basis. The way to create projects inside TFS is first you have to create a team project and then you create folders which hold your individual projects and branches. So first, we are going to create a team project, click there, and we will give it a name so we will call it TFS1 and description of our project is TFS Team Project for Fundamentals of Software Version Control.

Watch the Online Video Course Fundamentals of Software Version Control

2h 55mIntermediateNov 07, 2012

Viewers:
in countries
Watching now:

This course is a gateway to learning software version control (SVC), process management, and collaboration techniques. Author Michael Lehman reviews the history of version control and demonstrates the fundamental concepts: check-in/checkout, forking, merging, commits, and distribution. The choice of an SVC system is critical to effectively managing and versioning the assets in a software development project (from source code, images, and compiled binaries to installation packages), so the course also surveys the solutions available. Michael examines Git, Perforce, Subversion, Mercurial, and Microsoft Team Foundation Server (TFS) in particular, describing the appropriate use, features, benefits, and optimal group size for each one.

Creating a repository and a project

All right, let's get ready to create some projects inside the TFS.There is only one repository in TFS, and that's on a machine-by-machine basis.The way to create projects inside TFS is first you have to create a team project and thenyou create folders which hold your individual projects and branches.So first, we are going to create a team project, click there, and we will give it a name sowe will call it TFS1 and description of our project is TFS Team Project for Fundamentalsof Software Version Control.

We will click Next and with TFS you always have to pick a Process Template.TFS comes out of the box with three Process Templates, Visual Studio Scrum, Agile SoftwareDevelopment 6.0 and MSF for CMMI.We are going to pick Visual Studio Scrum because we are not going to be using all of the featuresof Team Foundation Server, which has to do with how do you use the work items and howto you use the reporting facilities, and so that's what these templates define, they definework items, they define specific fields, inside the work items for use with Scrum or Agile or CMMI.

In our case, we are simply going to pick Scrum.If you want additional process templates, you can click on this link and Microsoft has awhole library of certified Process Templates. So we are going to pick Scrum, click Next.Now we are not going to branch from any other existing source control so we are just goingto click here, and there is our settings that we want to confirm. Yes, we want to call itTFS1, that's our description, we are going to use the Scrum template, and we are goingto create a new empty folder with TFS1 at the root, click Finish. All right.

We have successfully created our team project, TFS1 on our default collection of the TFS repository.So we are going to close this, and we are getting ready to create our first actual set of folders.In this chapter, we are going to use C# instead of C for our sample code. It is easilyadapted from our examples we have done before, and Visual Studio's TFS integration is veryeasy to see and use using C#.So we will come over here to the Start page, we will click New Project, and we are goingto pick Console Application, and we are going to put this in a directory we are going tocall c:\FSVC1, and we'll call the Solution name.

We are not going to automatically add it to source code control because I want to showyou how to add some of the source code control if you already have an existing solution.So we will just click OK here and up pops our main Program.cs.We are going to close that because we are going to use different files and here we nowwe can see in the Team Explorer that we can look at the Source Code Control Explorer,so we are going to do that, and now you can see here, here is our root repository, here's our team project.All we have is the BuildProcessTemplates under that, we don't have any folders, but we areabout to create that.

You can also now see that here is the local path for where this stuff is stored for therepository, not for the folder. So let's go back to the Solution Explorer.Here is our typical Solution Explorer for C# project. We are going to get rid ofProperties here in visual studio.What you don't see is this column right here, the blank column, is where Source code controlinformation such as, "Is it checked in?", "Is it modified?", and so forth is going to appear.So the way we get stared with that is we right-click on the Solution node and select this,Add Solution to Source Control, the Add Solution to Source Control dialog pops up and asksus where we want to store our solution inside the TFS server.

In this case, we want to put it inside our TFS1 team project, and we are going to havea solution folder. We are going to not name it Console Application 1, we are going tocall it TFSSample, and we are going to click OK. And now we can see a few things.Inside our TFS team project, we now have a folder called TFSSample.Now this is conceptually the same as a Git repository, a Mercurial repository or an SVNrepository, that particular folder.As we do additional operations, we will all be operating inside that folder.

You can see this green plus here indicates that this particular folder has been createdand associated with this repository but not yet checked in.So we open it up here, we can see inside this folder is our ConsoleApplication, inside thatis the Properties folder.The Folders column only shows folders, not the actual files.Over here if we look inside the Files, you can see here are all the files that are associatedwith that particular thing.And note now that this TFSSample folder is exactly where we told it to be, inside theFSVC1 folder and the ConsoleApplication folder was created by the new Project Template tohold the rest of our files.

We have got everything set up, now let's check in our changes.To do that, initially here we come to the Team Explorer.You can see here are our Pending Changes.We are going to enter in the Comment and click the Check In button.Visual studio will give you this Check-in Confirmation dialog every time you check in if you want.In our case, I am going to click the Don't prompt again because I am going to assumethat I know when I am checking in what it is I want to change, or I can also look atthis Pending Changes dialog at any time. All right.

Now you can see Changeset 10 successfully checked in.Your numbers may vary. It might be Changeset 1 when you first do that.We did a little bit of a setup on the system to verify TFS is working before we startedto record this chapter, but that's the Changeset number, and TFS uses the word Changeset toidentify things and uses numbers.So now you can see all of our green plus signs are gone.Come back to the Solution Explorer, there is now a blue lock indicating that the files are checked in.So the Solution Explorer acts very similar to shell integration that you might see inother Source code control systems. So that's it.

We have got our team project created, we've got our Visual Studio project created, wehave got our folders created, we've got our initial stuff checked in, let's get on tomaking some changes and checking in and checking out and looking at history.

There are currently no FAQs about Fundamentals of Software Version Control.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.

Already a member ?

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships.
Learn more

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Thanks for signing up.

We’ll send you a confirmation email shortly.

Sign up and receive emails about lynda.com and our online training library:

new course releases

newsletter

general communications

special notices

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

new course releases

newsletter

general communications

special notices

Here’s our privacy policy with more details about how we handle your information.