MATLAB Programming Fundamentals - MathWorks

(やまだぃちぅ) #1

Set Up Git Source Control


In this section...
“About Git Source Control” on page 32-30
“Install Command-Line Git Client” on page 32-31
“Register Binary Files with Git” on page 32-32
“Add Git Submodules” on page 32-34

About Git Source Control


Git integration with MATLAB provides distributed source control with support for
creating and merging branches. Git is a distributed source control tool, so you can
commit changes to a local repository and later synchronize with other remote
repositories.

Git supports distributed development because every sandbox contains a complete
repository. The full revision history of every file is saved locally. This enables working
offline, because you do not need to contact remote repositories for every local edit and
commit, only when pushing batches of changes. In addition, you can create your own
branches and commit local edits. Doing so is fast, and you do not need to merge with
other changes on each commit.

Capabilities of Git source control:


  • Branch management

  • Local full revision history

  • Local access that is quicker than remote access

  • Offline working

  • Tracking of file names and contents separately

  • Enforcing of change logs for tracing accountability

  • Integration of batches of changes when ready


These capabilities do not suit every situation. If your project is not appropriate for offline
working or your repository is too large for a full local revision history, for example, Git is
not the ideal source control. In addition, if you need to enforce locking of files before
editing, Git does not have this ability. In that situation, SVN is the better choice.

32 Source Control Interface

Free download pdf