Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Creating a repository and a project

From: Fundamentals of Software Version Control

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.

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.

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 Software Development 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 features of Team Foundation Server, which has to do with how do you use the work items and how to you use the reporting facilities, and so that's what these templates define, they define work 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 a whole 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 going to click here, and there is our settings that we want to confirm. Yes, we want to call it TFS1, that's our description, we are going to use the Scrum template, and we are going to 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 easily adapted from our examples we have done before, and Visual Studio's TFS integration is very easy to see and use using C#. So we will come over here to the Start page, we will click New Project, and we are going to pick Console Application, and we are going to put this in a directory we are going to call 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 show you 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 now we 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 are about to create that.

You can also now see that here is the local path for where this stuff is stored for the repository, 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 of Properties here in visual studio. What you don't see is this column right here, the blank column, is where Source code control information 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 asks us 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 have a solution folder. We are going to not name it Console Application 1, we are going to call 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 SVN repository, 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 created and 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 that is 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 associated with that particular thing. And note now that this TFSSample folder is exactly where we told it to be, inside the FSVC1 folder and the ConsoleApplication folder was created by the new Project Template to hold 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 assume that I know when I am checking in what it is I want to change, or I can also look at this 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 started to record this chapter, but that's the Changeset number, and TFS uses the word Changeset to identify 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 in other Source code control systems. So that's it.

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

Show transcript

This video is part of

Image for Fundamentals of Software Version Control
Fundamentals of Software Version Control

49 video lessons · 11635 viewers

Michael Lehman
Author

 
Expand all | Collapse all
  1. 2m 12s
    1. Welcome
      56s
    2. What you should know before taking this course
      23s
    3. Using the exercise files
      53s
  2. 25m 8s
    1. Overview of software version control
      2m 51s
    2. Understanding version control concepts
      5m 14s
    3. Demo one: Getting started
      11m 1s
    4. Demo two: Handling the "oops"
      6m 2s
  3. 11m 3s
    1. The history of version control
      3m 44s
    2. Terminology
      4m 27s
    3. Exploring centralized vs. distributed systems
      2m 52s
  4. 28m 42s
    1. Getting files in and out of a repository
      4m 38s
    2. Saving changes and tracking history
      2m 47s
    3. Reverting to a prior version
      1m 42s
    4. Creating tags and labels
      1m 5s
    5. Branching and merging
      4m 10s
    6. Exploring workflow integration and continuous builds
      2m 46s
    7. Using graphical user interface (GUI) tools
      2m 39s
    8. Integrating a version control system with an integrated development environment (IDE)
      2m 50s
    9. Examining shell integration
      3m 26s
    10. Looking at forward and reverse integration
      2m 39s
  5. 25m 59s
    1. Installation and setup
      3m 31s
    2. Creating a repository and a project
      5m 10s
    3. Working with check-in, checkout, and revert
      6m 12s
    4. Tagging
      1m 34s
    5. Branching and merging
      5m 32s
    6. Working with GUI clients and IDE integration
      4m 0s
  6. 16m 13s
    1. Installation and setup
      55s
    2. Working with check-in, checkout, and revert
      9m 34s
    3. Tagging
      1m 7s
    4. Branching and merging
      4m 37s
  7. 26m 41s
    1. Installation and setup
      3m 47s
    2. Creating a repository and a project
      6m 15s
    3. Working with check-in, checkout, and revert
      8m 31s
    4. Tracking history and tagging
      2m 15s
    5. Branching and merging
      5m 53s
  8. 19m 25s
    1. Installation and setup
      3m 1s
    2. Creating a repository and a project
      1m 6s
    3. Working with check-in, checkout, and revert
      6m 39s
    4. Tagging
      2m 13s
    5. Branching and merging
      3m 44s
    6. Working with GUI clients and IDE integration
      2m 42s
  9. 16m 54s
    1. Installation and setup
      1m 48s
    2. Creating a repository and a project
      59s
    3. Working with check-in, checkout, revert, and tracking history
      6m 9s
    4. Tagging
      1m 50s
    5. Branching and merging
      4m 29s
    6. Exploring GUI and shell integration
      1m 39s
  10. 3m 38s
    1. Selecting a software version control that is right for you
      2m 30s
    2. Next steps
      1m 8s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

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.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Fundamentals of Software Version Control.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

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

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

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:

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:

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

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.