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

Fundamentals of Software Version Control
Illustration by

Working with check-in, checkout, and revert


From:

Fundamentals of Software Version Control

with Michael Lehman

Video: Working with check-in, checkout, and revert

We've got a repository and a project set up. Let's add a file and check it in. Our working set is in the trunk directory, so first we change to that directory and then we'll create the file and we're going to put in the following code. The content is from the new project haiku error messages page. We're going to pick one that's happened to all of us before we started using Version Control. With searching comes loss and the presence of absence, My Novel not found. All right.
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

Working with check-in, checkout, and revert

We've got a repository and a project set up. Let's add a file and check it in. Our working set is in the trunk directory, so first we change to that directory and then we'll create the file and we're going to put in the following code. The content is from the new project haiku error messages page. We're going to pick one that's happened to all of us before we started using Version Control. With searching comes loss and the presence of absence, My Novel not found. All right.

So we save it, and now we're going to add it to the repository. But before we add it to the repository, let's ask Subversion what's the status of the files in this directory. You can see it doesn't know what to do with f1.c because we have to tell it to add it to the repository. So to add it, we type svn add f1.c, and then if we run svn status again, you can see we have a pending add for our file that's not yet been checked in. So to check it in, we're going to commit it, we're going to type svn commit, and we're going to put a commit message on the command line here, Add f1.c.

Now, if we ask svn the status of this project, we can see that all the files are checked in. But if we want to look at the log, we can only see the message that says, we imported the structure. You might wonder what happened to my check in? Well, with svn, in order to get the log up to date, you need to run svn update command. Now when we look at the log, you can see both the initial creation of the directory and the addition of f1.c. Now, if you look at the beginning of each of the lines in the log, here, and here, you can see the letter R followed by a number.

In Subversion, this is the revision number or changeset ID. So let's use Notepad to open up f1.c, and then we'll change the words "My Novel" to the word "Website". Now we'll save the file. Now we're going to check it in again, but this time we'll use the editor feature to add our commit message. SVN has many shortcuts for its commands, and in this case we'll use svn ci, which is a shortcut for commit. As you saw before, CO is used for check-out, so they had to use some other set of letters, instead of using CO for commit, they used CU, as in check in.

So we type this and Notepad opens. You did remember to set your SVN_EDITOR environment variable right? If not, you got an error message at this point. So set that environment variable now and rerun this command in order to follow along from this state. So in the editor that appears, in our case it was Notepad, you might have set it up to use your own favorite editor. We're going to add a multi-line message, so Change "My Novel" to Website.

Change message to better reflect product features. And as we save this and exit, we can once again run svn update, and then run svn log and see here's our Import structure, our Add f1.c, and our multi-line change message. Now, when you're trying to hunt for A revision number for some of the commands we're about to use, this could get very, very long with all of the change messages.

So the log file command has a way of allowing you to see just the revision numbers and the times. So if you type svn log -q, you get a listing that just has one line for each revision or changeset that's been checked in. So now let's make another change, and then we'll roll it back. So once again, we're going to open up f1.c, and we're going to change Website to Webpage. In order to see the differences between our most recent version in our working set, we can use the svn diff command, and you can see it shows that we're currently on revision 4 in the repository. This is our working copy, and here this is essentially the line we deleted, website not found, and this is the line we added or essentially changed to Web page not found.

Now, svn diff shows the differences between all the files in the working set and the repository. So if we want to only see the differences between one file in the current repository, we can say svn diff f1.c. Now in our case, it's going to be exactly the same, because we only have one file. You can also ask for the differences between the working set and a specific version. So for example, if we say svn diff and ask for the distance between this and revision 3, you can see that in revision 3 we had "My Novel" and currently we have Webpage. All right.

Now, let's roll back to the topmost revision, which is our most recent commit. So we say svn revert and revert this file. Now it's reverted. Now when we type it out, you can see we're back to Website. Finally, you can also revert to any revision, not just the top revision by using the update command. So let's go svn update, back to revision 3, and when we type it out again, we're back to "My Novel".

Note, none of your changes in the repository have been lost. Everything is all still there. It's just the basic workflow of being able to update the working set. So for example, we could update back to revision 4 and get back to Website, and now we're back to Website. Remember, none of your changes in the repository have been lost. You're just updating your working set. So that's the basic workflow of check in, check out, and revert. You'll also want to look at the Subversion documentation to see how to delete files, how to rename files, and how to move files within directories and create other directories.

All right. Now, let's move on to tagging.

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.