Share via


Sharing and Branching

Visual SourceSafe supports both sharing of files and projects, and branching of shared files. Sharing a Visual SourceSafe file or project makes it part of two projects at the same time, for example, in a case where you want to propagate a bug fix between development projects. To Visual SourceSafe, branching a shared file means breaking the shared link created when the file was shared.

Sharing Files or Projects

Visual SourceSafe has a Share command that allows sharing of files or projects. For use of the command, see How to: Share an Item.

When you request file sharing, Visual SourceSafe creates a shared link between the versions of the file in the projects that share the file. When you check in the file to one of the projects, your changes are automatically checked in to all the sharing projects. All the projects that share a specific file are listed in the Links tab for the file.

When you share a Visual SourceSafe project, you create a completely new duplicate project under the current project. All the files in the new project are shared with the corresponding file copies in the shared project, and changes in one are reflected in the other during check-ins to the Visual SourceSafe database.

Sharing has the following advantages:

  • Makes it unnecessary for each project that uses the shared item to store a separate copy. This conserves disk space on both client and server machines.

  • Because every project to which the item is shared uses the same version of the item, you avoid version incompatibilities that occur when each copy of an item is changing independently within multiple projects.

Branching Shared Files

Visual SourceSafe allows you to branch a shared file using the Branch command, available on the Versions menu of Visual SourceSafe Explorer. After branching, the file is independent, and changes made to it are not reflected elsewhere. Similarly, changes made in the previously shared file copy in the other project are not reflected in the branched file.

After you create a branch, the branched file and its counterpart in other projects have a shared history up to a certain point, and separate histories after that time. You can track the different branches on the Paths tab for Visual SourceSafe properties, and bring them back together using the Merge Branches command on the Tools menu. For more information about branching, see How to: Branch a File.

Sharing and Branching in One Operation

The Share command supports branching of a file immediately after sharing it. When you branch a file after sharing, the Links tab for file properties no longer shows a file relationship. However, you can use the Paths tab for file properties to see the path of the file branch you have created. For more information, see How to: Share and Branch a File.

See Also

Tasks

How to: Branch a File
How to: Share an Item
How to: Share and Branch a File