Getting Current Versions of Files

Home Page (Source-Code Control)OverviewHow Do I ... Topics

Updating your local copies of files to versions from the master source-code control files is called “getting” or “synchronizing” files. In any software project with multiple authors, you need to update your local copies frequently to ensure that you incorporate changes that other authors have made.

In a large project, changes can be made in files you normally do not work in, but that do contain information you use. For instance, project-wide header files may define manifest constants or macros that appear in your source files. When you get or synchronize your local files, the master versions of files are copied to your local project. The files are not checked out, and you cannot modify them and check in changes, but you can build with the most up-to-date versions.

If you have checked out files and made changes to your local copies, and other authors have made changes to those same files and checked them in, your source-code control system reports that you have changes to merge. You then need to follow the recommended procedures in your source-code control system to reconcile and verify those changes.

To get current files in your project

  1. In the FileView pane of the Project Workspace window, select the files that you want to get.

  2. From the Project menu, choose Source Control, and from the drop-down menu, choose Get Latest Version.

    The Get Latest Version dialog box appears, with checks next to the files that you have selected. The list includes all files in the project directory that are under source-code control, and you may check or uncheck any files in the list.

  3. Click OK.

The source-code control system copies all the selected files with changes by other authors to your local directory.

You can also have Visual C++ automatically prompt you to get the current versions of files when you open a project workspace.

To get current versions of files when opening a project workspace

  1. From the Tools menu, choose Options.

  2. Click the Source Control tab.

  3. Select the Get Files When Opening The Workspace check box.

  4. Click OK.