Development Environment    

Checking Files into the Source Control System

You can check in one or more MATLAB M-files, Simulink models, or Stateflow models.

Checking in a Single File

To check in a single file into the source control system:

  1. Select Source Control -> Check In from the File menu in the MATLAB Editor, Simulink model, or Stateflow model:
  1. The MATLAB Check in file(s) dialog box opens.

.

  1. If you want to check in the file to the source control system and keep it checked out so you can continue making changes, select Keep checked out. If you have comments, type them in the Comments area.
  1. Your comments will be submitted whether or not you select Keep checked out.

  1. Click OK.
  1. The file is checked into the source control system. If you did not save the file before checking it in, it is automatically saved when it is checked in.

    If you did not keep the file checked out and you keep the file open, note that it is a read-only version.

Checking in Multiple Files

To check in multiple files into the source control system:

  1. Select the files in the MATLAB Current Directory window,

  1. Right click on the selected files.
  2. Select Source Control -> Check In from the pop-up menu.
  1. The MATLAB Check in file(s) dialog box opens.

  1. If you want to check in the files to the source control system and keep them checked out so you can continue making changes, select Keep checked out. If you have comments, type them in the Comments area.
  1. Your comments will be submitted whether or not you select Keep checked out.

  1. Click OK.
  1. The files are checked into the source control system. If you did not save the files before checking them in, they are automatically saved when they are checked in.

    If you did not keep the files checked out and you keep the files open, note that they are read-only versions.

Function Alternative for Checking In Files

Use checkin as the first argument in the verctrl function to check files into the source control system. Note that the verctrl function with the checkin argument returns a logical 1 to the workspace if the file has changed on disk or a logical 0 to the workspace if the file has not changed on disk. You can check in a single file or multiple files. The files can be open or closed when you use checkin. The verctrl function with the checkin argument has this form:


  Checking Files Out of the Source Control System Getting the Latest Version of Files from the Source Control System