With source control systems, you use a database to track, organize, and manage "projects." These projects are a unit of organization, like a folder, and can contain various kinds of files (items), including code and documentation. This version control enables you to more flexibly manage the contents of projects (for example, to include only items labeled as a "release" version of the application) and manage project history (to restore an older version, for example, for testing or rerelease). Some features are available only in the Microsoft development environment; some features are specific to Visual SourceSafe only. This section describes what you can do with each feature set and what you can do using them together.
With Visual SourceSafe and the Microsoft development environment, you can:
A typical source code control configuration assumes that all the files are kept in one master source code control database on a server, linked to the developers' computers by a network link. The master database is where you store the original information, such as code and documentation, and the individual computers are where you edit and compile the files. With a central location of the files for your team, you can better control the access to the files and the organization of the project tree.
The Microsoft development environment integrates the basic commands and functions of Visual SourceSafe directly into the Project Explorer for ease of use. The development environment also tracks the status of the projects and solutions to aid with renaming, adding, and deleting files to Visual SourceSafe.
You can maintain the files and code in the master source control database through these four basic commands, available in the Project Explorer (in the development environment):
The Get Latest Version command retrieves the most current copy of the item from the master source control server and copies it to the local machine. The item is still read-only. For step-by-step instructions, see Getting the Current Version of an Item.
You can Add to Source Control the project or solution shown in the Project Explorer (in the development environment). This sends a copy of the files to the master source control database you specify in the Visual SourceSafe project tree. For step-by-step instructions, see Adding a Project or Solution to Source Control.
The Check Out command retrieves the latest version of the item from the master source code control database and reserves that item to the local user who is checking it out. For step-by-step instructions, see Checking Items In and Out.
In Visual SourceSafe, you can set the check out option to exclusive (one person at a time) or multiple (check out one item to many people at once). The default setting is exclusive check out. This avoids many editing conflicts when checking the item back in.
The Check In command copies a local item to the master database, adding the latest version. For step-by-step instructions, see Checking Items In and Out.
You can see the history of a source control project through the History command in the development environment. This tells you when the latest changes were made, and by whom, and what happened to the item each time it was checked in, from the time it was first created. For step-by-step instructions, see Viewing the History of a Source Control Item.
You can share an item across more than one source control project (Visual SourceSafe only). When you update one copy of the shared file, all copies reflect the new changes. The shared item is stored only once in the Visual SourceSafe database, with pointers to the item in the other projects. For step-by-step instructions, see Sharing a Project.
This method makes it possible to share common components across several different projects. Keep in mind that source control systems can store any kind of item — including code, documentation, stored procedures, and HTML items.
Branching is feature specific to Visual SourceSafe. You can branch a project in source control by sharing a project to an additional location in your source control project tree. When the project is shared, you can choose to branch the project, and the connection to the duplicate project is broken, so that changes are no longer updated from the other shared projects.
You can use the Change Location command in the development environment to point your local project to the new location of the project in source control. This feature is useful for creating a special version of a common file, for creating separate versions for language differences, or for customizing an application. You can also use this feature to branch files of a specific version of the finished application.
You can put two versions of the same item together with the merge feature (available only in Visual SourceSafe). This feature displays the two versions of the items side by side in Visual SourceSafe, and you reconcile the changes you want to keep in the final version of the item.
Merging versions is useful if the multiple check out feature in Visual SourceSafe is enabled. This is also useful when updating changes to a branched item.