MATLAB Programming Fundamentals - MathWorks

(やまだぃちぅ) #1
Action Procedure
Commit all modified files to
source control.

In the Files view, select the Modified (number of files)
tab. On the Project tab, in the Source Control section,
click Commit. Enter comments in the dialog box, and click
Submit. If you are using Git source control, this commits
to your local repository. If you are using SVN source
control, this commits changes to your repository.

A message appears if you cannot commit because the
repository has moved ahead. Before you can commit the
file, you must update its revision up to the current HEAD
revision. If you are using Git source control, click Pull. If
you are using SVN source control, click Update. Resolve
any conflicts before you commit.
Commit selected files to
source control.

In the Files view, select the files, right-click, and select
Source Control > Commit.

If you commit individual files, you risk not committing the
related project definition files that keep track of your files.
To avoid this, commit all modified files.
Push project files with Git. To send local commits to the remote repository, on the
Project tab, in the Source Control section, click Push. A
message appears if you cannot push your changes directly
because the repository has moved on. Click Fetch to fetch
all changes from the remote repository. Merge branches
and resolve conflicts, and then you can push your changes.
For more information, see “Pull, Push and Fetch Files with
Git” on page 32-45.
Push empty project folders
with Git.

You cannot add empty folders to Git source control, so you
cannot click Push and then clone an empty folder. You can
create an empty folder in a project, but if you push
changes and then sync a new sandbox, the empty folder
does not appear in the new sandbox. Instead, run Check
Project, which creates the empty folder for you.

Alternatively, to push empty folders to the repository for
other users to sync, create a gitignore file in the folder
and then push your changes.

31 Projects

Free download pdf