View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Git Matlab

Be the first to rate this file! 4 Downloads (last 30 days) File Size: 2.28 KB File ID: #38600 Version: 1.0
image thumbnail

Git Matlab



Git Matlab is a simple git wrapper allows the execution of git commands from within Matlab.

| Watch this File

File Information

This function provides a simple and clean interface to git. Not only does it execute git commands it also allows you to specify a which text editor should be launched in the case that one is needed by git.

% GIT - use GIT from matlab, using standard GIT commands
% Examples:
% % initialize a repository
% >> git init;
% % add a file to the repository
% >> git add myFile.m % begin tracking my_function.m
% % commit changes to the repository
% >> git commit myFile.m -m 'initial checkin of myFile.m'
% % push to another repository
% >> git push origin master
% Commands that require additionall input (such as commits without -m flags)
% will generally fail unless the environment variable EDITOR is defined. However,
% a preferred text editor can be specified within Matlab using the global
% variable GIT_EDITOR (Pro-tip: include this code in your startup.m file)
% For Example:
% Declare the global variable
% >> global GIT_EDITOR;
% For linux:
% >> GIT_EDITOR = '/path/to/editor'; % provide the complete path
% For Mac OSX:
% >> GIT_EDITOR = 'TextEdit'; % Simply provide the application name
% The most up to date version of this code can be found at:

MATLAB release MATLAB 8.0 (R2012b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.

Contact us