Rank: 218845 based on 0 downloads (last 30 days) and 0 file submitted
photo

John Stowers

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by John
Updated File Comments Rating
25 Aug 2011 A thin MATLAB wrapper for the Git source control system Use this exactly as you would use the OS command-line Git, but from within MATLAB Author: Manu Raghavan

This works better for me on linux

[status,i_] = system('git status');

% if git is in the path this will return a status of 0 or 128
% depending on whether we are sitting in a repository or not
% it will return a 1 only if the command is not found

if (status==0)
% call the real git with the arguments
arguments = parse(varargin{:});
[i_,result] = system(['git --no-pager ',arguments]);
disp(result)
elseif (status==128)
warning('Not a git repository');
else
error('git is not installed');
end

Contact us