Start learning with our library of video tutorials taught by experts. Get started

Fundamentals of Software Version Control
Illustration by

Creating a repository and a project


From:

Fundamentals of Software Version Control

with Michael Lehman

Video: Creating a repository and a project

Now that we've got Subversion installed, let's create a repository and then a project inside that repository. Creating a repository in Subversion is easy, use the svnadmin command. So we're going to say svnadmin create c:\svn\r1, r1 is the name of the repository you want to create. You don't have to create it inside the SVN directory, but it's a convenient way to make it easy to back up all the repositories by simply backing up the SVN directory. Next step, we need to create a project.
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

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
please wait ...
Fundamentals of Software Version Control
2h 55m Intermediate Nov 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.

Topics include:
  • Comparing centralized vs. distributed systems
  • Saving changes and tracking history
  • Using revert or rollback
  • Working with the GUI tools
  • Using IDE and shell integration
  • Installing different systems
  • Creating a repository
  • Tagging code
  • Branching and merging code
  • Selecting a software version control system that's right for you
Subjects:
Developer Mobile Apps Desktop Apps Programming Foundations
Software:
Git Mercurial ALM/TFS Perforce
Author:
Michael Lehman

Creating a repository and a project

Now that we've got Subversion installed, let's create a repository and then a project inside that repository. Creating a repository in Subversion is easy, use the svnadmin command. So we're going to say svnadmin create c:\svn\r1, r1 is the name of the repository you want to create. You don't have to create it inside the SVN directory, but it's a convenient way to make it easy to back up all the repositories by simply backing up the SVN directory. Next step, we need to create a project.

Project setup in Subversion can appear to be somewhat complex, but once you have learned how to do it, it's the same every time. There is a set of conventions that are commonly used so that if you move from one group to another that's using some version, you'll see the same kind of pattern being used because it makes it easy to do branches and tags and keep track of which is the trunk. So, I always name my projects, as you know XXX-YYY, where XXX is the name of the repository and YYY is the name of the project.

So then I know just by being in the project directory where everything is located. So we'll create the project by saying svn mkdir and then create the URI and then use the URI for our repository r1/r1-p1 and then we'll create a commit message for that, "Create project p1". All right. Our project is now there. Now as I mentioned, using SVN is the convention regarding how the project directories are set up.

This involves creating three specific directories, one called branches, one called tags, and one called trunk. If you have an existing directory of source code, what I would suggest you do is go there, create these three directories, and then move the original contents of your directory into the trunk subdirectory before doing the import. Since we don't have an existing directory, we're going to create this directory structure and import it into Subversion. So we're going to go into the temp directory, and we're going to make a directory called r1-p1, and then we're going to go in there and create the subdirectories, so it should look like that.

Now, we're going to import that into Subversion by using svn import, and in this case, I'm not going to put the -m because I'm going to show you how the editor's invocation works because we did that set SVN_EDITOR=notepad , and so here it's going to open up Notepad. You'll see that there is a line that says --This line, and those below, will be ignored--. That shows you the status of all the things you're doing. Any line or lines you put before that are your commit message. So we're going to put Import structure of project p1 and then when we save that and quit Notepad, it automatically adds it to the Subversion repository.

Now in our case, since we did it from a temporary directory, we can go ahead and go back to the root and delete that temporary directory. And now finally, we want to change directory to the place where we want the working set to live. In this case, I'm going to do it at the root of the C drive, but you may want to put it inside of a directory called work or div, or wherever you keep your source code. Note that this is different than your original directory if you had files in it. You can put it in that same place, but remember your original directory with files is not part of Subversion, it's not being tracked for source code control, so you need to create a new directory using Subversion that has not only your files, but also some metadata that allows Subversion to track your changes.

So in our case, we're going to svn co--now CO is short for checkout. Subversion has long and short versions of many of the commands. In this case, CO stands for checkout. Another one I'll use quite a bit is CI, which is short for check in, which is actually short for the Subversion commit command. So we're going to check out our svn repository 1, repository 1, project 1, and what this is going to do is not only create a C:\r1-p1 directory, it's also going to collect all the data from the repository, including any files we had in the trunk directory and put them in there and tell Subversion to start tracking them.

So now if we go and cd to r1-p1, you can see that there is our subdirectory structure that we wanted to have. Now in order to be able to ask the Subversion if it's really tracking this, we can say svn log -v, and now we can see the entire log. First, you'll see revision 2 says that changed these paths, and so revision 1, we actually created the subdirectory for project p1. So that's all there is to creating a repository and a project.

You can easily create additional projects inside this repository, you simply skip the first SVN admin command and then just start with the svn mkdir command for creating your additional projects. Let's move on to adding some files in there and do some check ins and check outs.

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

 
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.
Upgrade now


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.

join now Upgrade now

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

Notes cannot be added for locked videos.

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.