What is version control? Why use it? How do I use it?
See the lecture notes, but briefly:
- Version control lets you maintain successive versions of the software (and associated documents) that you develop
- Version control helps you:
- Try out ideas and (as needed) revert to previous ideas
- Combine the efforts of a team of software engineers
- To use version control, you:
- Checkout your project from the repository to your laptop
- Work on the project on your laptop
- Checkin your project from your laptop to the repository
- In our system, checkin involves four steps:
- Update to get any changes that your partner has done concurrently
- Add contents to add any new files that you created to your project
- Commit to copy the changes to your project back to the repository
- (sometimes) Tag the version to give the version a name (like Stage1, Stage2, etc)
Checkout a project as follows:
This example uses the JavaEyes project;
do other projects in a similar fashion, just changing the Module.
You should have a folder called projects (or some such name)
in a sensible place below My Documents. If you don't have such a folder, create one now.
- If you are working on this module with a partner,
do Step 0 ONCE at the beginning of your work on that module:
- Decide whether you will use your repository or your partner's (either is fine)
- In the following instructions, let's suppose that:
- smith and jones are partners
- They are using smith's repository
- smith is in section 1
- Smith: Start up Wake and access MyComputer's G: drive that results.
- Smith: Browse to your repository:
/class/csse/csse120/turnin/section1/smith/cvshome
- When you do this, use your own section number and your own username
- Right-click on the JavaEyes folder beneath cvshome and then:
- Select AFS ~ Access Control Lists
- Add jones and give jones full rights to this folder (i.e., check all the boxes)
- Repeat the previous step for each of the subfolders of JavaEyes. It has 3 subfolders:
- classes
- docs
- docs/resources
|
- Right-click on your projects folder and select CVS Checkout...
|
- In the window that appears, fill in the following slots as indicated.
- After you do this the first time,
just select the appropriate PreviousCVSRoot from the top entry and change entries as needed.
Slot
| Value to place in that slot
|
|
Protocol: | Secure shell (:ext:)
|
Server: | sliderule.rose-hulman.edu
|
Repository folder: | /class/csse/csse120/turnin/section1/smith/cvshome
But:
- Replace the section (section1) and username (smith)
- by the section and username of the partner who will maintain this module
|
User name: | Type your username (all lowercase letters) (e.g., jones)
|
Module: | JavaEyes
|
- Select the OK button.
- Every time that you are asked to enter your password, do so.
- If you are asked a security message about trusting CVS, respond Yes.
- You should eventually get some messages in green, indicating a successful checkout.
- If you get any error messages, get help.
Now the project should be checked out, and hence on your laptop.
It should be colored green, to indicate that it is under CVS control.