Desktop Tools and Development Environment |
Checking Files Into and Out of Source Control from MATLAB
Before checking files into and out of your source control system from MATLAB, be sure to set up your system for use with MATLAB as described in Setting Up the Source Control Interface.
Check Files Into Source Control
After creating or modifying files in MATLAB or related products, check the files into the source control system by performing these steps:
If a file contains unsaved changes when you try to check it in, you will be prompted to save the changes to complete the checkin. If you did not keep the file checked out and you keep the file open, note that it is a read-only version.
Function Alternative. The function alternative is verctrl
with the checkin
argument.
Check Files Out of Source Control
From MATLAB, to check out the files you want to modify, perform these steps:
After checking out a file, make changes to it in MATLAB or another product, and save the file. For example, edit an M-file in the Editor/Debugger.
If you try to change a file without first having checked it out, the file is read-only, as seen in the title bar, and you will not be able to save any changes. This protects you from accidentally overwriting the source control version of the file.
If you end the MATLAB session, the file remains checked out. You can check in the file from within MATLAB during a later session, or directly from your source control system.
Function Alternative. The function alternative is verctrl
with the checkout
argument.
You can undo the checkout for files. The file remains checked in, and does not have any of the changes you made since you last checked it out. To save any changes you have made since checking out a file, select File -> Save As, and supply a different filename before you undo the checkout.
To undo a checkout, follow these steps:
Function Alternative. The function alternative is verctrl
with the undocheckout
argument.
Setting Up the Source Control Interface | Additional Source Control Actions |
© 1994-2005 The MathWorks, Inc.